public async Task <ActionResult> Update(int id) { UserUpdateModel model = new UserUpdateModel(); GetUserByIdDto user = await Mediator.Send(new GetUserByIdQuery { Id = id }); model = user.ToUserUpdateModel(); model.AvailableDomains = GetDomains(); model.Departments = await GetDepartments(); model.Users = await GetUsers(); return(View(model)); }
public static UserUpdateModel ToUserUpdateModel(this GetUserByIdDto dto) { return(dto.MapTo <GetUserByIdDto, UserUpdateModel>()); }