public void UpdateIncident(Incident incident) { if (incident != null) { this.odataClient.UpdateObject(incident); this.odataClient.SaveChanges(SaveChangesOptions.PatchOnUpdate); } }
public Incident GetIncident(long incidentId) { this.odataClient.MergeOption = MergeOption.OverwriteChanges; Incident targetIncident = this.odataClient.incidents.Where(o => o.Id == incidentId).SingleOrDefault(); if (targetIncident == null) { throw new Exception("Invalid incident provided."); } return(targetIncident); }
public void UpdateIncident(Incident incident) { if (incident != null) { this.odataClient.UpdateObject(incident); this.odataClient.SaveChanges(SaveChangesOptions.PatchOnUpdate); } }