public async Task <List <SecurityRole> > GetSecurityRoles(int userId) { var userLogin = await new UserLoginLogic(Context).GetUserLogin(userId); if (userLogin == null) { throw new CallerException("User does not have login"); } using (var uow = new UnitOfWork(Context)) { var repo = new UserSecurityRoleRepository(uow); var securityRoles = await repo.GetAll().Where(c => c.UserId == userId).ToListAsync(); return(securityRoles.Select(c => c.SecurityRole).ToList()); } }