Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# linq query map to entity

public List<CustomUser> GetActiveCustomuser()
{
    return context.Users
       .Where(u => u.Active)
       .Select(new CustomUser() 
           { 
               Name = u.Name, 
               Place = new CustomPlace() { Name = u.Place.Name }
           })
       .ToList();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #linq #query #map #entity
ADD COMMENT
Topic
Name
4+5 =