//********************************************************** //* Добавление нового состояния Vm //********************************************************** public static void AddState(String description) { using (SandBoxDataContext db = new SandBoxDataContext()) { Int32 maxState = (from s in db.VmStates orderby s.State select s.State).Max(); VmState vmState = new VmState { State = maxState + 1, Description = description }; db.VmStates.InsertOnSubmit(vmState); db.SubmitChanges(); } }
partial void DeleteVmState(VmState instance);
partial void UpdateVmState(VmState instance);
partial void InsertVmState(VmState instance);
private void detach_VmStates(VmState entity) { this.SendPropertyChanging(); entity.Vm = null; }
private void attach_VmStates(VmState entity) { this.SendPropertyChanging(); entity.Vm = this; }