Esempio n. 1
0
        public IHttpActionResult UpdatePersonalData([FromBody] ApiUserProfile model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _userService.UpdatePersonalData(Mapper.ToBllUserProfile(model));
            return(Json(new HttpResponseMessage(HttpStatusCode.NoContent)));
        }
Esempio n. 2
0
 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);
 }