feat(repository): Überladung der ReadAsync-Methode mit Username- und usrId-Filter in ProfileControlsTFRepository hinzugefügt
- Überladung von `ReadAsync` hinzugefügt, um die Filterung nach `usrId` und `username` zu unterstützen. - `ReadAsync` aktualisiert, um die Einzelabfrage mit `FirstOrDefaultAsync` zu ermöglichen. - Abfrageflexibilität verbessert, indem Benutzer- und Profilfilter in beiden asynchronen Methoden zugelassen werden.
This commit is contained in:
parent
e0877f5990
commit
480dcce051
@ -6,5 +6,7 @@ namespace WorkFlow.Infrastructure.Contracts
|
||||
public interface IProfileControlsTFRepository : ICRUDRepository<ProfileControlsTF, int>
|
||||
{
|
||||
Task<IEnumerable<ProfileControlsTF>> ReadAsync(bool withProfile = true, bool withUser = false, int? profileId = null, int? objId = null, bool? profileActive = null);
|
||||
|
||||
Task<ProfileControlsTF?> ReadAsync(bool withProfile = true, bool withUser = false, int? usrId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null);
|
||||
}
|
||||
}
|
||||
@ -36,7 +36,11 @@ namespace WorkFlow.Infrastructure.Repositories
|
||||
return query;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<ProfileControlsTF>> ReadAsync(bool withProfile = true, bool withUser = false, int? profileId = null, int? objId = null, bool? profileActive = null)
|
||||
public async Task<IEnumerable<ProfileControlsTF>> ReadAsync(bool withProfile = true, bool withUser = true, int? profileId = null, int? objId = null, bool? profileActive = null)
|
||||
=> await Read(withProfile: withProfile, withUser: withUser, profileId: profileId, objId: objId, profileActive: profileActive).ToListAsync();
|
||||
|
||||
public async Task<ProfileControlsTF?> ReadAsync(bool withProfile = true, bool withUser = false, int? usrId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null)
|
||||
=> await Read(withProfile: withProfile, withUser: withUser, usrId: usrId, username: username, profileId: profileId, objId: objId, profileActive: profileActive)
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user