public ActionResult AddGroup(Group model) { GroupsDbDataContext db = new GroupsDbDataContext(); if (ModelState.IsValid) { Group gr = new Group(); gr.Date = DateTime.Now; gr.GroupName = model.GroupName; gr.TypeId = model.TypeId; db.Groups.InsertOnSubmit(gr); db.SubmitChanges(); } return RedirectToAction("Index"); }
private void detach_Groups(Group entity) { this.SendPropertyChanging(); entity.Type = null; }
private void attach_Groups(Group entity) { this.SendPropertyChanging(); entity.Type = this; }
partial void DeleteGroup(Group instance);
partial void UpdateGroup(Group instance);
partial void InsertGroup(Group instance);