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