@ -6,7 +6,7 @@ This document explains how to integrate EF Core as an ORM provider to ABP based
`Volo.Abp.EntityFrameworkCore` is the main nuget package for the EF Core integration. Install it to your project (for a layered application, to your data/infrastructure layer):
`Volo.Abp.EntityFrameworkCore` is the main nuget package for the EF Core integration. Install it to your project (for a layered application, to your data/infrastructure layer):
````
```` shell
Install-Package Volo.Abp.EntityFrameworkCore
Install-Package Volo.Abp.EntityFrameworkCore
````
````
@ -164,7 +164,7 @@ public class BookRepository : EfCoreRepository<BookStoreDbContext, Book, Guid>,
public async Task DeleteBooksByType(BookType type)
public async Task DeleteBooksByType(BookType type)
{
{
await DbContext.Database.ExecuteSqlCommandAsync(
await DbContext.Database.ExecuteSqlCommandAsync(
$"DELETE FROM Books WHERE Type = {(int)type}"
$"DELETE FROM Books WHERE Type = {(int)type}"
);
);
}
}
@ -191,8 +191,8 @@ This is especially important when you want to **override a base repository metho
````csharp
````csharp
public override async Task DeleteAsync(
public override async Task DeleteAsync(
Guid id,
Guid id,
bool autoSave = false,
bool autoSave = false,
CancellationToken cancellationToken = default)
CancellationToken cancellationToken = default)
{
{
//TODO: Custom implementation of the delete method
//TODO: Custom implementation of the delete method
@ -235,8 +235,8 @@ First, define your repository classes like that:
```csharp
```csharp
public class MyRepositoryBase<TEntity>
public class MyRepositoryBase<TEntity>
: EfCoreRepository<BookStoreDbContext,TEntity>
: EfCoreRepository<BookStoreDbContext,TEntity>
where TEntity : class, IEntity
where TEntity : class, IEntity
{
{
public MyRepositoryBase(IDbContextProvider<BookStoreDbContext> dbContextProvider)
public MyRepositoryBase(IDbContextProvider<BookStoreDbContext> dbContextProvider)