Example #1
0
 public UserForListOfUsersModel Map(Domain.Models.User user)
 {
     return(new UserForListOfUsersModel
     {
         Id = user.Id,
         Name = user.Name,
         Email = user.Email,
         Roles = user.Roles.Select(item => _roleMapper.Map(item)).ToList()
     });
 }
        public TransferUser Map(User user)
        {
            if (user == null)
            {
                return(null);
            }
            return(new TransferUser
            {
                UserId = user.UserId,
                Login = user.Login,
                PrompterStatus = user.PrompterStatus,
                Password = user.Password,
                Disabled = user.Disabled,

                RoleId = user.RoleId,

                Role = _roleMapper.Map(user.Role),

                EntityState = EntityState.Unchanged
            });
        }