public IHttpActionResult UpdatePersonalData([FromBody] ApiUserProfile model) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _userService.UpdatePersonalData(Mapper.ToBllUserProfile(model)); return(Json(new HttpResponseMessage(HttpStatusCode.NoContent))); }
internal static BllUserProfile ToBllUserProfile(ApiUserProfile model) { if (model != null) { return new BllUserProfile { TimeRegister = model.TimeRegister, Photo = model.Photo, Id = model.Id, Password = model.Password, Email = model.Email, Name = model.Name } } ; return(null); }