📜  c# linq 查询映射到实体 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:12.930000             🧑  作者: Mango

代码示例2
public List GetActiveCustomuser()
{
    return context.Users
       .Where(u => u.Active)
       .Select(new CustomUser() 
           { 
               Name = u.Name, 
               Place = new CustomPlace() { Name = u.Place.Name }
           })
       .ToList();
}