public JsonResult UpdateDMS(int dmsid, string name) { var dmsObj = new DmsProvider() { DmsProviderId = dmsid, Name = name }; repository.Update(dmsObj); repository.Save(); return(Json(new { success = true })); }
// POST: odata/DealerGroups public async Task <IHttpActionResult> Post(DmsProvider DmsProvider) { try { repository.Create <DmsProvider>(DmsProvider); await repository.SaveAsync(); return(Created(DmsProvider)); } catch (Exception ex) { throw (ex); } }
public async Task <IHttpActionResult> Put([FromODataUri] int key, DmsProvider DmsProvider) { Validate(DmsProvider); try { repository.Update <DmsProvider>(DmsProvider); await repository.SaveAsync(); return(Updated(DmsProvider)); } catch (Exception ex) { throw (ex); } }