public static void UpdateInstructor() { Container cntr = new Container(baseUri); Instructor instr = cntr.Instructors.Where(inst => inst.Id == 1).Single(); instr.Name = instr.Name + "-updated"; cntr.UpdateObject(instr); cntr.SaveChanges(SaveChangesOptions.ReplaceOnUpdate); }
public static void UpdateStudent() { Container cntr = new Container(baseUri); Student std = cntr.Students.Where(st => st.Id == 1).Single(); std.Name = std.Name + "-updated"; cntr.UpdateObject(std); cntr.SaveChanges(SaveChangesOptions.ReplaceOnUpdate); }
public static void UpdateClass() { Container cntr = new Container(baseUri); Class cls = cntr.Classes.Where(clss => clss.Id == 1).Single(); cls.Name = cls.Name + "-updated"; cntr.UpdateObject(cls); cntr.SaveChanges(SaveChangesOptions.ReplaceOnUpdate); }