alonsoChen wrote:
Is there any example for nhibernate v4 CRUD?
No sorry. The generated code is simply giving you a default setup of NHibernate and mappings, how to use NHibernate after that is up to the NHibernate documentation and tutorials. The generated code is not different than what you'd write yourself and how you'd use nhibernate with hand-written mappings/session manager classes.
Is there any connection string can set in code instead of using configuration file through nhibernate v4 , llblgen v5.3 and how?
No. In that case you should create your own SessionManager class which you could base on the one that's generated and where you pass in the connection string in the constructor instead of reading it from the config file as the generated class does.
The generated class is just a basic one, you might want a more advanced one or a different one. If you don't want the code generator to generate the SessionManager class anymore, simply remove the task definition from the preset, using the PresetViewer in the designer, open the preset you're using and remove the SessionManager task from it.