estoy trabajando en conseguir los resultados de esta consulta SQL en LINQLINQ distintas()
SELECT DISTINCT(Type)
FROM Product
WHERE categoryID = @catID
esta es mi consulta repositorio:
public IQueryable<ProdInfo> GetProdInfo()
{
var data = from u in db.Prod
select new ProdInfo
{
PID = u.PID,
CatID = u.CatID,
LastChanged = u.LastChanged,
ChangedBy = u.ChangedBy,
Type = u.Type,
};
return data;
}
filtro:
public static IQueryable<ProdInfo> GetDistinctProdType(this IQueryable<ProdInfo> qry,int CatID)
{
return from p in qry
where p.CatID.Equals(CatID)
select p;
}
Necesito el filtro para devolver el disti nct prod tipo? ¿Cómo puedo hacer esto?