Skip to content

Commit

Permalink
Allow directly accessing underlying technology via repository
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriyDurov committed Jul 6, 2024
1 parent 7bdd002 commit 7a10bfa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BitzArt.CA.Core/Interfaces/IRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ namespace BitzArt.CA;

public interface IRepository
{
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
public object Provider { get; }

public Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}

public interface IRepository<TEntity> : IRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public virtual async Task<int> SaveChangesAsync(CancellationToken cancellationTo

return await Db.SaveChangesAsync(cancellationToken);
}

public object Provider => Db;
}

public class AppDbRepository<TEntity>(AppDbContext db) : AppDbRepository(db), IRepository<TEntity>
Expand Down

0 comments on commit 7a10bfa

Please sign in to comment.