diff --git a/WorkFlow.Infrastructure/Contracts/IProfileControlsTFRepository.cs b/WorkFlow.Infrastructure/Contracts/IProfileControlsTFRepository.cs index 9a8a4c0..4bace08 100644 --- a/WorkFlow.Infrastructure/Contracts/IProfileControlsTFRepository.cs +++ b/WorkFlow.Infrastructure/Contracts/IProfileControlsTFRepository.cs @@ -6,5 +6,7 @@ namespace WorkFlow.Infrastructure.Contracts public interface IProfileControlsTFRepository : ICRUDRepository { Task> ReadAsync(bool withProfile = true, bool withUser = false, int? profileId = null, int? objId = null, bool? profileActive = null); + + Task ReadAsync(bool withProfile = true, bool withUser = false, int? usrId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null); } } \ No newline at end of file diff --git a/WorkFlow.Infrastructure/Repositories/ProfileControlsTFRepository.cs b/WorkFlow.Infrastructure/Repositories/ProfileControlsTFRepository.cs index 23801cb..2e63f89 100644 --- a/WorkFlow.Infrastructure/Repositories/ProfileControlsTFRepository.cs +++ b/WorkFlow.Infrastructure/Repositories/ProfileControlsTFRepository.cs @@ -36,7 +36,11 @@ namespace WorkFlow.Infrastructure.Repositories return query; } - public async Task> ReadAsync(bool withProfile = true, bool withUser = false, int? profileId = null, int? objId = null, bool? profileActive = null) + public async Task> 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 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(); } } \ No newline at end of file