Open Access & RadgridView (SofiaRentalCar)

4 posts, 0 answers
  1. Gonzalo
    Gonzalo avatar
    76 posts
    Member since:
    Oct 2012

    Posted 19 Dec 2011 Link to this post

    Do you happen to have a sample using Open Access ORM & RadGridView in a master-detail scenario? In code? Customer/Orders/Order Details...

    Thanks,

    Gonzalo
  2. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 22 Dec 2011 Link to this post

    Hi Gonzalo,

    Unfortunately we are not offering such sample for the time being. However, we are going to consider adding such sample in our SDK in the next several months.Which RadGridView are you using - WPF, Silverlight or WinForms?

    If you have any problem or difficulty with the implementation, do not hesitate to get back to us for assistance. 

    Kind regards,
    Ivailo
    the Telerik team

    Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

  3. DevCraft banner
  4. Gonzalo
    Gonzalo avatar
    76 posts
    Member since:
    Oct 2012

    Posted 22 Dec 2011 Link to this post

    Hi Ivailo,

    Thanks for your prompt response. How about this: how would you rewrite this

    public IQueryable<Car> GetCarByCustomerName(string customerName)
    {
        var query = from c in this.DataContext.Cars
                    from ro in this.DataContext.RentalOrders
                    where ro.CarID == c.CarID && ro.Customer.FullName == customerName
                    select c;
     
        return query;
    }
    to get returned a couple of columns such as:

                                            c.Make, c.Model, c.CarYear
    
    also a way to get a combination of fields coming out of both tables c and ro
    
    Thanks and best regards,
    
    Merry Christmas :) and a Happy New Year
    
    G 
    

  5. Ivailo
    Admin
    Ivailo avatar
    318 posts

    Posted 23 Dec 2011 Link to this post

    Hi Gonzalo,

    I would write something like:

    public object GetCarByCustomerName(string customerName)
    {
        var query = from c in this.Cars
                    from ro in this.RentalOrders
                    where ro.CarID == c.CarID && ro.Customer.FullName == customerName
                    select new { c.Make, c.Model, c.CarYear, ro.OrderTotal };
     
        return query;
    }

    I hope that helps.

    Thanks for the nice wishes :) Happy holidays to you too!

    Ivailo
    the Telerik team

    Q3’11 of Telerik OpenAccess ORM is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Back to Top