var user = (db.Users.Where(u => u.CountryId == c)).Select(u=> new { u.UserName, u.Email, u.Country.Name, u.PhoneNumber, u.LastLogin });
In this code, the datatype of 'Select' part is 'anonymous'. I don't want anonymous datatype and I want db.Users type. Kindly let me know how to solve this and thanks a lot for viewing my question.


Vinay SinghRank #604 · 4K reputationPosted Jun 17, 2016, 12:57 AM EDT
Ravi PatelRank #439 · 5.7K reputationPosted Jun 17, 2016, 1:27 AM EDT