Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }