123456789101112131415161718192021222324252627282930 |
- using ERP.Core.Dto;
- using ERP.Core.Entity;
- using ERP.Framework.WebApi;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Internal;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ERP.Core.Repository
- {
- public class SysRoleRepository : BaseRepository<SysRole, CoreDbContext>
- {
- public SysRoleRepository(CoreDbContext context) : base(context)
- {
- }
- public List<SysRole> SelectRoleListByUserId(long userId)
- {
- var q = from ur in Context.Set<SysUserRole>()
- join r in Context.Set<SysRole>() on ur.RoleId equals r.Id
- where ur.UserId.Equals(userId)
- select r;
- return q.ToList();
- }
- }
- }
|