I am just starting with dynamic data. I have an enttity framework called UsersModel.edmx.
It returns a list of all companies in the tblCompany table. This list is really big.
I need to filter the list returned to all user controls on the client so that it only returns the company that have a CompanyTypeId= 2 or CompanyTypeId= 3 and company name != "".
1 - Is it possible to filter the company list returned on the server so that I can filter only once for all the controls that use that on the client?
My ideas was to do something like this using linq and lambda but I am not sure how:
return tblCompanys.Where(c => c.CompanyTypeId == 2 || c.CompanyTypeId == 3 && ).Where(c=>c.CompanyName != "").OrderBy(c => c.CompanyName).Distinct().OrderBy(c=>c.CompanyName);
2 - I have created a partial class and a metadata class and added the DisplayColumn attribute to use the company name and sort by company name ascending.
Could I use the code to filter the returned companies in this? where?
public partial class t
View Complete Post