This is a migrated thread and some comments may be shown as answers.

Open Access & RadgridView (SofiaRentalCar)

3 Answers 59 Views
Integration with other products
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gonzalo
Top achievements
Rank 2
Gonzalo asked on 19 Dec 2011, 10:09 PM
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

3 Answers, 1 is accepted

Sort by
0
Ivailo
Telerik team
answered on 22 Dec 2011, 06:57 PM
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!

0
Gonzalo
Top achievements
Rank 2
answered on 22 Dec 2011, 11:08 PM
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 

0
Ivailo
Telerik team
answered on 23 Dec 2011, 06:35 PM
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!

Tags
Integration with other products
Asked by
Gonzalo
Top achievements
Rank 2
Answers by
Ivailo
Telerik team
Gonzalo
Top achievements
Rank 2
Share this question
or