public HttpResponseMessage Update2(UserOnboardUpdate2 model, int id) { if (!ModelState.IsValid) { return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState); } SucessResponse response = new SucessResponse(); UserOnboardService.Update2(model); return Request.CreateResponse(response); }
public static void Update2(UserOnboardUpdate2 model) { DataProvider.ExecuteNonQuery(GetConnection, "dbo.Users_Onboard_Update2", inputParamMapper: delegate(SqlParameterCollection u) { u.AddWithValue("@Id", model.Id); u.AddWithValue("@FirstName", model.FirstName); u.AddWithValue("@LastName", model.LastName); u.AddWithValue("@Gender", model.Gender); u.AddWithValue("@EthnicityId", model.EthnicityId); u.AddWithValue("@DateOfBirth", model.DateOfBirth); u.AddWithValue("@Phone", model.Phone); }); }