简体   繁体   中英

Truncate table in Linq to Entity

I've got an ADO.NET entity data model in my C# project (.NET 3.5) and am using it quite happily. I'd like to be able to truncate the tables in this model. I've searched online and most suggest using "ExecuteCommand" but my data context doesn't show ExecuteCommand as a usable method. What could I be doing wrong here?

Thanks,

Sounds like you're using Entity Framework rather than Linq to SQL? - try ExecuteStoreCommand

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM