I'm having issues running my application where it uses nhibernate. the runtime issue I'm getting is:
The element 'session-factory' in namespace 'urn:nhibernate-configuration-2.2' has invalid child element 'add' in namespace 'urn:nhibernate-configuration-2.2'. List of possible elements expected: 'property, mapping, class-cache, collection-cache, event, listener' in namespace 'urn:nhibernate-configuration-2.2'.
My code is:
protected void Initialization(Assembly[] assemblies, string fileName)
{
logger.DebugFormat( @"Initialization Start {0:HH:mm:ss.fff}", DateTime.Now );
SessionFactory = Fluently
.Configure(
new Configuration()
.Configure( fileName )
)
.Mappings( x => assemblies
.ForEach( a => x
.FluentMappings
.AddFromAssembly( a )
.Conventions
.Add(
AutoImport.Never(),
DefaultCascade.All(),
DefaultLazy.Always(),
ForeignKey.EndsWith( "Id" ),
PrimaryKey.Name.Is( c => c.EntityType.Name + "Id" ),
Table.Is( c => "[" + c.EntityType.Name + "]" )
)
)
)
.BuildSessionFactory();
logger.DebugFormat( @"Initialization Finish {0:HH:mm:ss.fff}", DateTime.Now );
}
I'm having issues running my application where it uses nhibernate. the runtime issue I'm getting is:
The element 'session-factory' in namespace 'urn:nhibernate-configuration-2.2' has invalid child element 'add' in namespace 'urn:nhibernate-configuration-2.2'. List of possible elements expected: 'property, mapping, class-cache, collection-cache, event, listener' in namespace 'urn:nhibernate-configuration-2.2'.
My code is:
filename contents:
I already installed Full-Text and Semantic Extractions for Search but it still didn't fix my issue