Where is the ExecuteStoreCommand method in Entity Framework 5?

16,600

Try this:

ctx.Database.ExecuteSqlCommand
Share:
16,600
qakmak
Author by

qakmak

Updated on June 26, 2022

Comments

  • qakmak
    qakmak almost 2 years

    I'm using EF5 in VS2012, and I trying to delete all data of some table using ExecuteStoreCommand, something like this:

    ctx.ExecuteStoreCommand("TRUNCATE TABLE [" + tableName + "]");
    

    but the problem is EF is telling me, method ExecuteStoreCommand not found. I can't understand why?

    Can you tell me why?, or give me a performant solution remove all data of the table.