Beispiel #1
0
 public static TodoDbDto From(Todo todo, TodoGroup group, User user)
 {
     return(new TodoDbDto
     {
         Name = todo.Name.Value,
         IsComplited = todo.IsComplited,
         Created = todo.Created,
         Complited = todo.Complited,
         Group = TodoGroupDbDto.From(group, user)
     });
 }
 public static UserDbDto From(User user)
 {
     return(new UserDbDto
     {
         Id = user.Id,
         Age = user.Age.Value,
         Name = user.Name.Value,
         Photo = user.Photo.Value,
         Groups = user.Groups.Select(g => TodoGroupDbDto.From(g, user)).ToList(),
         RowVersion = user.RowVersion
     });
 }