コード例 #1
0
 public Domain.Models.User Map(UserForListOfUsersModel user)
 {
     return(new Domain.Models.User
     {
         Roles = user.Roles.Select(item => _roleMapper.Map(item)).ToList(),
         Id = user.Id,
         Email = user.Email,
         Name = user.Name
     });
 }
コード例 #2
0
 public Domain.Models.User Map(UserForListOfUsersModel user)
 {
     return new Domain.Models.User
     {
         Roles = user.Roles.Select(item => _roleMapper.Map(item)).ToList(),
         Id = user.Id,
         Email = user.Email,
         Name = user.Name
     };
 }
コード例 #3
0
 public IHttpActionResult Put(UserForListOfUsersModel user)
 {
     if (_userservice.ChangeRolesOfUser(_usermapper.Map(user)))
     {
         return Ok();
     }
     else
     {
         return NotFound();
     };
 }