12345678910111213141516171819202122 |
- using ERP.Core.Entities;
- using ERP.Framework.WebApi;
- namespace ERP.Core.Repositorys
- {
- 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();
- }
- }
- }
|