public ActionResult TruncateAllTables() { BetsDBDataContext context = new BetsDBDataContext(); context.ExecuteCommand("TRUNCATE TABLE [MyBets].[dbo].[OutcomeFiles]" + "TRUNCATE TABLE [MyBets].[dbo].[BetFiles] " + "TRUNCATE TABLE [MyBets].[dbo].[Outcomes]" + "TRUNCATE TABLE [MyBets].[dbo].[Bets]" + "TRUNCATE TABLE [MyBets].[dbo].[BindBetFile]" + "TRUNCATE TABLE [MyBets].[dbo].[BindBetOutcome]" + "TRUNCATE TABLE [MyBets].[dbo].[BindOutcomeFile]"); return RedirectToAction("Index"); }