I have following tables
- User - Primary column - Id and other detail columns
- Department - Primary column - Id and other detail columns
- UserDepartment - Primary column - Id and other columns are UserId and DepartmentId
I want to find all users those are in department - (1 and 2). I also want to find all users those are in department - (1 or 2).
Can anybody suggest me the criteria to get all users in department (1 and 2)? Another criteria to get all users in department - (1 or 2)?
I am new to FluentNHibernate, so didn't tried anything yet as I found nothing relevant on Google search? With the help of Google search, I was able to write criteria for 1-1 relations but not for above scenario.