public static IRepositoryQuery <TEntity> FilterCurrentCompany <TEntity>(this IRepositoryQuery <TEntity> rq) where TEntity : EntityBaseCompany { var bs = new BaseService(); Guid companyId = bs.GetCurrentCompanyId(); rq.Filter(x => x.companyId == companyId); return(rq); }