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 { public SysRoleRepository(CoreDbContext context) : base(context) { } public List SelectRoleListByUserId(long userId) { var q = from ur in Context.Set() join r in Context.Set() on ur.RoleId equals r.Id where ur.UserId.Equals(userId) select r; return q.ToList(); } } }