public void ClearDatabase() { List <Weapon> weapons = mediatorweapon.GetAll(); List <Warframe> warframes = mediatorwarframe.GetAll(); for (int i = 1; i <= weapons.Capacity; i++) { mediatorweapon.DeleteByID(weapons[i].ID); } for (int i = 1; i <= warframes.Capacity; i++) { mediatorwarframe.DeleteByID(warframes[i].ID); } }
public ActionResult DeleteConfirmed(int id) { weapon.DeleteByID(id); return(RedirectToAction("Weapons")); }