I am new in nHibernate and i want to convert following sql query in nHibernate criteria
SELECT DISTINCT fReportID, fFiscalYear
FROM tFCMaster
WHERE fPropertyID='100'
I tried this:
Session.CreateCriteria<tFCMaster>().Add(Expression.Eq("fPropertyID", PropertyID))
.SetProjection(Projections.Distinct(Projections.Property("fFiscalYear")))
.List<tFCMaster>();
help will appreciated.