Q3 2012 SP1
3.5, 4.0, 4.5
|Visual Studio version
2008, 2010, 2012
C# and VB
ASP.NET Ajax Q3 2012 SP2
In order to pass the result from a LINQ statement to a method or assign it to a property, you may need to modify it so that it corresponds to certain logic.
This project demonstrates the two most common approaches applied in such cases:
- Shaping the result to an anonymous type
- Shaping the result to a predefined result set
When you use an anonymous type the definition of the result shape is performed in the LINQ statement itself, while with the predefined result set you need to strongly-type the properties of the result in a class.
The anonymous type approach can be very useful in cases when you need to populate a lot of grids with different content, whereas the predefined result set is appropriate when you populate controls with the same content.
The project is created using Telerik OpenAccess ORM Q3 2012 SP1 (version 2012.3.1209).
The Northwind database