1
To insert a filter in my query the command is in a repository and I want to insert a filter in it, it can be by name for example.
Code:
public IList < T > Consultar() {
using(ISession session = FluentnHibernateHelper.OpenSession()) {
return (from e in session.Query < T > () select e).ToList();
}
}
I ended up doing it a little differently, but following this line, thank you very much for the help my dear. #PEACE
– user92218
How good, put as it solved (For if someone has the same doubt) and if possible positive if it worked my idea :).
– Luiz Santos
I created a public method within the repository class and insert the following code. using (Isession Session = Fluentnhibernatehelper.Opensession()) { var file = Session.Queryover<File>() . Where(a => a.Primario == true); Return file.List<File>(); }
– user92218
Nice! looks like it works
– Luiz Santos
Yes, actually I have little experience with C# working, seeing new things like parameterization and hybernate.
– user92218