We can truncate table in the Datacontext entity framework by the below code
var objCtx = ((System.Data.Entity.Infrastructure.IObjectContextAdapter)objentity).ObjectContext;
objCtx.ExecuteStoreCommand("TRUNCATE TABLE [Table]");

0 comments:
Post a Comment