I need to create an HQL query inside a C # method. The structure looks something like this: I have the method:
IList<int>GetListYear(Guid educationalInstitutionId, Guid academicLevelId, Guid? locationId, Guid? programOfferedId)
{
//Implementar a consulta HQL
}
And I have the query in HQL:
"select distinct ConclusionYear
from AlumniProgramOffered
inner join AlumniSignup
inner join ProgramOffered
inner join Program
where AlumniSignup.EducationalInstitution.Identity = educationalInstitutionId
and Program.AcademicLevel.Identity = academicLevelId
and ProgramOffered.Location.Identity = locationId or locationId is null
and ProgramOffered.Identity = programOfferedId or programOfferedId is null"
How can I set up this structure in order to join the HQL query with the parameters I received from my method?