I'm using the following:
Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2005.ConnectionString(connectionString))
.Mappings(m => m.AutoMappings.Add(AutoMap.AssemblyOf<Incident>()
.Where(t => t.Namespace.StartsWith("EDA.DomainModel.POCO"))))
.ExposeConfiguration(BuildSchema)
.BuildSessionFactory();
It's essentially a copy of what's in the Fluent NHibernate wiki. However, whenever I run this line, it throws out this InnerException
:
"The type or method has 2 generic parameter(s), but 1 generic argument(s) were provided. A generic argument must be provided for each generic parameter."
I'm really not sure what the problem is, so I'm wondering if Fluent NHibernate can do automapping together with schema generation in the first place. What I want to do is just create a persistence layer for the POCO's without having to see the database or fool around with any tables whatsoever.