public IHttpActionResult PostPersonalInformations(PersonalInformationModel model) { try { _logger.Debug(string.Format("ini process - Post,idUser:{0}", CurrentIdUser)); if (!ModelState.IsValid) { _logger.Debug(string.Format("ini Post - inValid,idUser:{0}", CurrentIdUser)); return(BadRequest(ModelState)); } PersonalInformation personalinformation = AutoMapper.Mapper.Map <PersonalInformation>(model); personalinformation.LastActivityIdUser = CurrentIdUser; personalinformation.CreationIdUser = CurrentIdUser; _personalinformationBL.Insert(personalinformation); _logger.Debug(string.Format("finish Post - success,idUser:{0}", CurrentIdUser)); return(Ok(new JsonResponse { Success = true, Message = "PersonalInformation was Saved successfully", Data = personalinformation })); } catch (Exception ex) { LogError(ex); return(InternalServerError(ex)); } }