Example #1
0
        public async Task <UserProfile> GetUserProfileByUserId(Guid userId)
        {
            var specs       = new GetUserProfileByUserIdSpecification(userId);
            var userProfile = await _unitOfWork.Repository <UserProfile>().GetEntityWithSpec(specs);

            return(userProfile);
        }
Example #2
0
        public async Task <IReadOnlyList <Payroll> > GetPayrollByUserProfileId(Guid userId)
        {
            var userProfileSpecs = new GetUserProfileByUserIdSpecification(userId);
            var userProfile      = _unitOfWork.Repository <UserProfile>().GetEntityWithSpec(userProfileSpecs);

            var specs   = new GetPayrollByUserProfileIdSpecification(userProfile.Id);
            var payroll = await _unitOfWork.Repository <Payroll>().ListAsync(specs);

            return(payroll);
        }