diff --git a/docs/en/Entity-Framework-Core.md b/docs/en/Entity-Framework-Core.md index 9d29f58fd2..586c8d4a01 100644 --- a/docs/en/Entity-Framework-Core.md +++ b/docs/en/Entity-Framework-Core.md @@ -193,7 +193,7 @@ public class BookRepository : EfCoreRepository, public async Task DeleteBooksByType(BookType type) { - await DbContext.Database.ExecuteSqlCommandAsync( + await DbContext.Database.ExecuteSqlRawAsync( $"DELETE FROM Books WHERE Type = {(int)type}" ); } diff --git a/docs/zh-Hans/Entity-Framework-Core.md b/docs/zh-Hans/Entity-Framework-Core.md index 6a7f69c2aa..0ba30f625f 100644 --- a/docs/zh-Hans/Entity-Framework-Core.md +++ b/docs/zh-Hans/Entity-Framework-Core.md @@ -165,7 +165,7 @@ public class BookRepository : EfCoreRepository, public async Task DeleteBooksByType(BookType type) { - await DbContext.Database.ExecuteSqlCommandAsync( + await DbContext.Database.ExecuteSqlRawAsync( $"DELETE FROM Books WHERE Type = {(int)type}" ); } @@ -317,4 +317,4 @@ context.Services.AddAbpDbContext(options => }); ```` -在这个例子中,`OtherDbContext`实现了`IBookStoreDbContext`. 此功能允许你在开发时使用多个DbContext(每个模块一个),但在运行时可以使用单个DbContext(实现所有DbContext的所有接口). \ No newline at end of file +在这个例子中,`OtherDbContext`实现了`IBookStoreDbContext`. 此功能允许你在开发时使用多个DbContext(每个模块一个),但在运行时可以使用单个DbContext(实现所有DbContext的所有接口).