xxxxxxxxxx
public static IQueryable<ProdType> GetDistinctProdType(
this IQueryable<ProdInfo> query,
int categoryId)
{
return (from p in query
where p.CatID == categoryId
select p.Type).Distinct();
}
xxxxxxxxxx
var _dbLogList = (from d in _context.pu_Synchronize_Log
join cd in _context.pu_Synchronize_Child_Log
on d.Synchronize_Log_Id equals cd.Synchronize_Log_Id
where cd.Mobile_Device_Id == preference.DId && cd.Synchronize_Status == "OPEN"
&& !d.Is_Deleted && !cd.Is_Deleted
select new
{
d.Service_Name,
}).Distinct().ToList();