diff --git a/WorkFlow.Infrastructure/Contracts/IProfileObjStateRepository.cs b/WorkFlow.Infrastructure/Contracts/IProfileObjStateRepository.cs index 95afaa1..83a6600 100644 --- a/WorkFlow.Infrastructure/Contracts/IProfileObjStateRepository.cs +++ b/WorkFlow.Infrastructure/Contracts/IProfileObjStateRepository.cs @@ -5,8 +5,10 @@ namespace WorkFlow.Infrastructure.Contracts { public interface IProfileObjStateRepository : ICRUDRepository { - Task> ReadAsync(bool isReadonly = true, bool withProfile = true, bool withUser = true, bool withState = true, int? profileId = null, int? objId = null, bool? profileActive = null); - - Task ReadAsync(bool isReadonly = true, bool withProfile = true, bool withUser = false, bool withState = true, int? usrId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null); + Task> ReadAsync( + bool isReadonly = true, + bool withProfile = true, bool withUser = true, bool withState = true, + 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/ProfileObjStateRepository.cs b/WorkFlow.Infrastructure/Repositories/ProfileObjStateRepository.cs index 6039dd6..e25fad6 100644 --- a/WorkFlow.Infrastructure/Repositories/ProfileObjStateRepository.cs +++ b/WorkFlow.Infrastructure/Repositories/ProfileObjStateRepository.cs @@ -44,11 +44,16 @@ namespace WorkFlow.Infrastructure.Repositories return query; } - public async Task> ReadAsync(bool isReadonly = true, bool withProfile = true, bool withUser = true, bool withState = true, int? profileId = null, int? objId = null, bool? profileActive = null) - => await Read(isReadonly: isReadonly, withProfile: withProfile, withUser: withUser, withState: withState, profileId: profileId, objId: objId, profileActive: profileActive).ToListAsync(); - - public async Task ReadAsync(bool isReadonly = true, bool withProfile = true, bool withUser = false, bool withState = true, int? usrId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null) - => await Read(isReadonly: isReadonly, withProfile: withProfile, withUser: withUser, withState: withState, usrId: usrId, username: username, profileId: profileId, objId: objId, profileActive: profileActive) - .FirstOrDefaultAsync(); + public async Task> ReadAsync( + bool isReadonly = true, + bool withProfile = true, bool withUser = true, bool withState = true, + int? usrId = null, string? username = null, + int? profileId = null, int? objId = null, bool? profileActive = null) + => await Read( + isReadonly: isReadonly, + withProfile: withProfile, withUser: withUser, withState: withState, + usrId: usrId, username: username, + profileId: profileId, objId: objId, profileActive: profileActive) + .ToListAsync(); } } \ No newline at end of file