Hi,
I am using nhibernate versiom 2.1 with Asp.net MVC application here
we have used Follwing code
configuration.Interceptor = new NHibernateInterceptor();
configuration.Configure();
//
configuration.AddMappingsFromAssembly(typeof(NHibernateConfigurator).Assembly);
//var cfg = new NHibernate.Cfg.Configuration();
//cfg.Configure(); // read config default style
////Fluently.Configure(cfg)
// .Mappings(
// m =>
m.FluentMappings.AddFromAssemblyOf<HybridSessionBuilder>())
// .BuildSessionFactory();
var cfg =
Fluently.Configure(configuration)
.Mappings(m =>
{
m.FluentMappings.AddFromAssemblyOf<HybridSessionBuilder>()
.Conventions.Add(PrimaryKey.Name.Is(x
=> "ID"))
.Conventions.Add(DefaultLazy.Always())
.Conventions.Add(ForeignKey.EndsWith("ID"));
m.HbmMappings.AddFromAssemblyOf<HybridSessionBuilder>();
m.MergeMappings();
}
)
.BuildConfiguration();
return configuration;
this code getas all the entyty classes but i am not getting newly
added entity for newly added table in databse
please help .
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.