GridView ObjectDataSource LINQ Paging and Sorting using multiple table query?

This is a functional programming thing. Mutating Account by doing an assignment is out. New-ing up a new instance of the shape you want is in Step 1: declare a class that has the shape of the result you want: public class QueryResult { public int CompanyID {get;set;} public string CurrencyName {get;set;} public string PriceTypeName {get;set;} } Step 2: project into that class in your query from ... where ... select new QueryResult() { CompanyID = a.

CompanyID, CurrencyName = a.Currency. Name, PriceTypeName = a.PriceType. Name } Step 3: Profit!(order by that) The query generator will use the details of your QueryResult type to generate a select clause with that shape.

This is a functional programming thing. Mutating Account by doing an assignment is out. New-ing up a new instance of the shape you want is in.

Step 1: declare a class that has the shape of the result you want: public class QueryResult { public int CompanyID {get;set;} public string CurrencyName {get;set;} public string PriceTypeName {get;set;} } Step 2: project into that class in your query from ... where ... select new QueryResult() { CompanyID = a. CompanyID, CurrencyName = a.Currency. Name, PriceTypeName = a.PriceType.Name }; Step 3: Profit!

(order by that) The query generator will use the details of your QueryResult type to generate a select clause with that shape.

Thats brilliant thanks for that. I have decided to go down creating MSSQL Views. As this way would involve creating new partial classes for each page on the site.It is definately something to bare in mind.

Cheers – Bodar Jun 16 '10 at 16:30.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions