1

I am basically new to Nhibernate and I am facing problems in converting this query to NHibernate ICriteria interface:

SELECT Batch, 
       FkDegreeID,
       CourseTitle
  FROM JinnahCourseMapping
  JOIN JinnahCourse ON JinnahCourseMapping.FkCourseID = JinnahCourse.ID
 WHERE JinnahCourseMapping.FkDegreeID = 196608 
   AND JinnahCourseMapping.Batch = '2007';

I can't seem to find any solid answer to the problem, I'm hoping someone will be able to help me here :(

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • Is there a reason that you want to convert this to ICriteria and not HQL or LINQ? Which version of NHibernate are you using? – James Kovacs Nov 24 '10 at 01:30

1 Answers1

0

Your sql code seems to be quite straightforward. What kind of problem do you have? Here is a similar question that could help you: NHibernate - CreateCriteria vs CreateAlias.

Community
  • 1
  • 1
Denis Ivin
  • 5,594
  • 1
  • 26
  • 25