refactor(Profil): dto in den Ordner DTO verschieben.

- Ordner DTO in Dto umbenennen
This commit is contained in:
2025-07-30 13:21:18 +02:00
parent 6c0f39e3ed
commit 904536bd09
36 changed files with 120 additions and 224 deletions

View File

@@ -6,48 +6,9 @@ using WorkFlow.Domain.Entities;
namespace WorkFlow.Infrastructure.Repositories;
public class ProfileControlsTFRepository : CRUDRepository<ProfileControlsTF, int, WFDBContext>, IProfileControlsTFRepository, ICRUDRepository<ProfileControlsTF, int>
public class ProfileControlsTFRepository : CRUDRepository<ProfileControlsTF, long, WFDBContext>, IProfileControlsTFRepository, ICRUDRepository<ProfileControlsTF, long>
{
public ProfileControlsTFRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileControlsTFs)
{
}
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 = true, int? profileId = null, int? userId = null, string? username = null, int? objId = null)
{
var query = isReadonly ? _dbSet.AsNoTracking() : _dbSet.AsQueryable();
if (withProfile)
query = query.Include(pctf => pctf.Profile);
if (withUser)
query = query.Include(pctf => pctf.User);
if (profileId is not null)
query = query.Where(pctf => pctf.ProfileId == profileId);
if (userId is not null)
query = query.Where(pctf => pctf.UserId == userId);
if (username is null)
query = query.Where(pctf => pctf.User!.Username == username);
if (objId is not null)
query = query.Where(pctf => pctf.ObjId == objId);
return query;
}
public async Task<IEnumerable<ProfileControlsTF>> ReadAsync(
bool isReadonly = true,
bool withProfile = true, bool withUser = true,
int? userId = null, string? username = null,
int? profileId = null, int? objId = null, bool? profileActive = null)
=> await Read(
isReadonly: isReadonly,
withProfile: withProfile, withUser: withUser,
userId: userId, username: username,
profileId: profileId, objId: objId)
.ToListAsync();
}

View File

@@ -6,7 +6,7 @@ using WorkFlow.Domain.Entities;
namespace WorkFlow.Infrastructure.Repositories;
public class ProfileObjStateRepository : CRUDRepository<ProfileObjState, int, WFDBContext>, IProfileObjStateRepository, ICRUDRepository<ProfileObjState, int>
public class ProfileObjStateRepository : CRUDRepository<ProfileObjState, long, WFDBContext>, IProfileObjStateRepository, ICRUDRepository<ProfileObjState, long>
{
public ProfileObjStateRepository(WFDBContext dbContext) : base(dbContext, dbContext.ProfileObjStates)
{