In my asp.net mvc application I'm using nhibernate 3.2 as ORM. I have catalogue structure like ..\Models\Persons with User.cs and OtherClass.cs in it and also ..\Mapping with files hibernate.xml,Persons.xml I added mapping files as embeeded resources and in code of application I have
Assembly assembly = Assembly.GetExecutingAssembly();
config.AddAssembly(assembly);
sFactory = config.BuildSessionFactory();
I tried to run simple hql query
From User up WHERE up.Password=admin AND up.Login=admin
but I still get an error:
A first chance exception of type 'NHibernate.Hql.Ast.ANTLR.QuerySyntaxException' occurred in NHibernate.DLL
User is not mapped [ FROM User up WHERE up.Password=admin AND up.Login=admin]
I can't get an idea what I'm doing wrong. I'd appreciate any help.