예제 #1
0
 public void Update(ProfilePersonRequest model)
 {
     DataProvider.ExecuteNonQuery("dbo.Profile_UpdatePerson"
                                  , inputParamMapper : delegate(SqlParameterCollection paramCollection)
     {
         paramCollection.AddWithValue("@UserId", model.UserId);
         paramCollection.AddWithValue("@ModifiedBy", model.ModifiedBy);
         paramCollection.AddWithValue("@FirstName", model.FirstName);
         paramCollection.AddWithValue("@MiddleName", model.MiddleName);
         paramCollection.AddWithValue("@LastName", model.LastName);
     });
 }
예제 #2
0
 public HttpResponseMessage UpdateProfilePerson(ProfilePersonRequest model)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
         }
         _profilePersonService.Update(model);
         return(Request.CreateResponse(HttpStatusCode.OK, new SuccessResponse()));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex));
     }
 }