public HttpResponseMessage Update(EducationLevelUpdateRequest model, int id) { _svc.Update(model, id); ItemResponse <int> response = new ItemResponse <int>(); response.Item = id; return(Request.CreateResponse(HttpStatusCode.OK, response)); }
//UPDATE public void Update(EducationLevelUpdateRequest model) { DataProvider.ExecuteNonQuery(GetConnection, "dbo.EducationLevel_Update", inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@Id", model.Id); MapCommonParameters(model, paramCollection); } ); return; }
public HttpResponseMessage Update(EducationLevelUpdateRequest model) { if (!ModelState.IsValid) { return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState)); } _educationLevelService.Update(model); SuccessResponse response = new SuccessResponse(); return(Request.CreateResponse(HttpStatusCode.OK, response)); }
public void Update(EducationLevelUpdateRequest model, int Id) { _prov.ExecuteNonQuery("dbo.EducationLevel_Update", inputParamMapper : delegate(SqlParameterCollection paramCollection) { paramCollection.AddWithValue("@Id", Id); paramCollection.AddWithValue("@Code", model.Code); paramCollection.AddWithValue("@LevelOfEducation", model.LevelOfEducation); paramCollection.AddWithValue("@DisplayOrder", model.DisplayOrder); paramCollection.AddWithValue("@Inactive", model.Inactive); } ); }