public static internalDTO.Identity.AppUser MapFromExternal(externalDTO.Identity.AppUser appUser) { var res = appUser == null ? null : new internalDTO.Identity.AppUser { Id = appUser.Id, FirstName = appUser.FirstName, LastName = appUser.LastName }; return(res); }
public static internalDTO.Identity.AppUser MapFromExternal(externalDTO.Identity.AppUser appUser) { var res = appUser == null ? null : new internalDTO.Identity.AppUser { Id = appUser.Id, FirstName = appUser.FirstName, LastName = appUser.LastName, HiringDate = appUser.HiringDate, LeftJob = appUser.LeftJob, Email = appUser.Email, PhoneNr = appUser.PhoneNr }; return(res); }
public static internalDTO.Identity.AppUser MapFromExternal(externalDTO.Identity.AppUser appUser) { var res = appUser == null ? null : new internalDTO.Identity.AppUser { Id = appUser.Id, FirstName = appUser.FirstName, LastName = appUser.LastName, SelfDescription = appUser.SelfDescription, HourlyRateId = appUser.HourlyRateId, HourlyRate = HourlyRateMapper.MapFromExternal(appUser.HourlyRate), Email = appUser.Email }; return(res); }
public async Task <IActionResult> PutAppUser(int id, PublicApi.v1.DTO.Identity.AppUser appUser) { if (id != appUser.Id) { return(BadRequest()); } // if (!await _bll.AppUsers.BelongsToUserAsync(id, User.GetUserId())) // { // return NotFound(); // } // appUser.Id = User.GetUserId(); _bll.AppUsers.Update(PublicApi.v1.Mappers.AppUserMapper.MapFromExternal(appUser)); await _bll.SaveChangesAsync(); return(NoContent()); }