// This is the Insert method to insert the entered SkillChart_Magic_Table item // USAGE: <asp:FormView InsertMethod="InsertItem"> public void InsertItem() { using (_db) { var item = new COMP2007_FInalAssignment.SkillChart_Magic_Table(); TryUpdateModel(item); if (ModelState.IsValid) { // Save changes _db.SkillChart_Magic_Table.Add(item); _db.SaveChanges(); Response.Redirect("Default"); } } }