示例#1
0
 public void UpdateIncident(Incident incident)
 {
     if (incident != null)
     {
         this.odataClient.UpdateObject(incident);
         this.odataClient.SaveChanges(SaveChangesOptions.PatchOnUpdate);
     }
 }
示例#2
0
        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);
        }
示例#3
0
 public void UpdateIncident(Incident incident)
 {
     if (incident != null)
     {
         this.odataClient.UpdateObject(incident);
         this.odataClient.SaveChanges(SaveChangesOptions.PatchOnUpdate);
     }
 }