Browse Source

Update Entity-Framework-Core.md

pull/2807/head
maliming 7 years ago
committed by GitHub
parent
commit
5841b5d537
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      docs/zh-Hans/Entity-Framework-Core.md

4
docs/zh-Hans/Entity-Framework-Core.md

@ -165,7 +165,7 @@ public class BookRepository : EfCoreRepository<BookStoreDbContext, Book, Guid>,
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<OtherDbContext>(options =>
});
````
在这个例子中,`OtherDbContext`实现了`IBookStoreDbContext`. 此功能允许你在开发时使用多个DbContext(每个模块一个),但在运行时可以使用单个DbContext(实现所有DbContext的所有接口).
在这个例子中,`OtherDbContext`实现了`IBookStoreDbContext`. 此功能允许你在开发时使用多个DbContext(每个模块一个),但在运行时可以使用单个DbContext(实现所有DbContext的所有接口).

Loading…
Cancel
Save