예제 #1
0
 public Agent Create(AgentModel model)
 {
     return(new Agent()
     {
         Id = model.Id,
         Name = model.Name,
         Username = model.Username
     });
 }
예제 #2
0
 public Agent Create(AgentModel model)
 {
     return(new Agent()
     {
         Id = model.Id,
         Name = model.Name,
         Username = model.Name.Split(' ')[0].ToLower(),
         Towns = model.Towns.Select(x => _unitOfWork.Towns.Get(x.Id)).ToList()
     });
 }