From b7f2efc2938aad4ec0dc8bb250147c6b81fa6680 Mon Sep 17 00:00:00 2001 From: Vova Zelenyi Date: Mon, 11 Sep 2023 19:55:04 +0200 Subject: [PATCH] fix modifiers in entity framework repository for reader and writer fields --- .../KirelGenericEntityFrameworkRepository.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Kirel.Repositories.EntityFramework/KirelGenericEntityFrameworkRepository.cs b/src/Kirel.Repositories.EntityFramework/KirelGenericEntityFrameworkRepository.cs index d0e2bf9..e894a4d 100644 --- a/src/Kirel.Repositories.EntityFramework/KirelGenericEntityFrameworkRepository.cs +++ b/src/Kirel.Repositories.EntityFramework/KirelGenericEntityFrameworkRepository.cs @@ -18,11 +18,17 @@ public class KirelGenericEntityFrameworkRepository : where TDbContext : DbContext { private readonly TDbContext _dbContext; - internal virtual IQueryable Reader + /// + /// Reader field for read access + /// + protected virtual IQueryable Reader { get => Writer.AsQueryable(); } - internal virtual DbSet Writer + /// + /// Writer field for write access + /// + protected virtual DbSet Writer { get => _dbContext.Set(); }