//********************************************************** //* Добавление новой системы Vm //********************************************************** public static void AddSystem(String description) { using (SandBoxDataContext db = new SandBoxDataContext()) { Int32 maxSystem = (from s in db.VmSystems orderby s.System select s.System).Max(); VmSystem vmSystem = new VmSystem { System = maxSystem + 1, Description = description }; db.VmSystems.InsertOnSubmit(vmSystem); db.SubmitChanges(); } }
partial void DeleteVmSystem(VmSystem instance);
partial void UpdateVmSystem(VmSystem instance);
partial void InsertVmSystem(VmSystem instance);
private void detach_VmSystems(VmSystem entity) { this.SendPropertyChanging(); entity.Vm = null; }
private void attach_VmSystems(VmSystem entity) { this.SendPropertyChanging(); entity.Vm = this; }