refactor(ProfileControlsTFRepository): Überschriebene ReadOnly-Methode, um Profile und User Entitäten standardmäßig einzuschließen.

This commit is contained in:
Developer 02 2024-10-23 13:25:57 +02:00
parent 480dcce051
commit 31bf58919d

View File

@ -8,6 +8,8 @@ namespace WorkFlow.Infrastructure.Repositories
{
public class ProfileControlsTFRepository(WFDBContext dbContext) : CRUDRepository<ProfileControlsTF, int, WFDBContext>(dbContext, dbContext.ProfileControlsTFs), IProfileControlsTFRepository, ICRUDRepository<ProfileControlsTF, int>
{
protected override IQueryable<ProfileControlsTF> ReadOnly() => base.ReadOnly().Include(pctf => pctf.Profile).Include(pctf => pctf.User);
protected IQueryable<ProfileControlsTF> Read(bool isReadonly = false, bool withProfile = true, bool withUser = false, int? profileId = null, int? usrId = null, string? username = null, int? objId = null, bool? profileActive = null)
{
var query = isReadonly ? _dbSet.AsNoTracking() : _dbSet.AsQueryable();