CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of projection
C#
// pseudo: if month(entered) greater than or equal to 7, return year(entered)
// else return year(entered)-1 (for school year conversion)
// returns distinct list of "school years"
 
var criteria = Session.CreateCriteria<MyEntity>();
var convertToSchoolYearProjection = 
Projections.Conditional(
 Restrictions.Ge(
  Projections.SqlFunction("month", 
    NHibernateUtil.Int32, 
by David R. Longnecker   May 21, 2010 @ 7:58am
1273 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate