#
greyd
Hey guys,
I believe have already been seen this message before at this forum
The fact: I rebuilt Cuyahoga.Core with little some modifications at ModuleLoader and SessionHelper... (only some experiments). after this, i give the message
"in expected: s [from StaticHtmlContent s where s.Section.Id = ? ]".
After reload official version of Core everything works again...
My modifications :
Some help will be very appreciated
//New experimental method
public void AddAssembly(string fatoryKey, Assembly assembly) {
// New kernel query
Configuration nhConfiguration = this._kernel[fatoryKey] as Configuration;
// Old kerney query
Configuration nhConfiguration = this._kernel[typeof(Configuration)] as Configuration;
nhConfiguration.AddAssembly(assembly, true);
ISessionFactory newSessionFactory = nhConfiguration.BuildSessionFactory();
ReplaceSessionFactory(fatoryKey, newSessionFactory);
}
//Overload to keep current behaviour
public void AddAssembly(Assembly assembly){
AddAssembly("nhibernate.factory", assembly);
}
private void cuyahogaSessionFactory_SessionFactoryRebuilt(object sender, EventArgs e){
ISessionFactory newNhSessionFactory = ((SessionFactory)this._kernel[typeof(SessionFactory)]).GetNHibernateFactory();
ReplaceSessionFactory("nhibernate.factory", newNhSessionFactory);
}
private void ReplaceSessionFactory(string fatoryKey, ISessionFactory nhSessionFactory){
this._kernel.RemoveComponent(fatoryKey);
this._kernel.AddComponentInstance(fatoryKey, nhSessionFactory);
}
I believe have already been seen this message before at this forum
The fact: I rebuilt Cuyahoga.Core with little some modifications at ModuleLoader and SessionHelper... (only some experiments). after this, i give the message
"in expected: s [from StaticHtmlContent s where s.Section.Id = ? ]".
After reload official version of Core everything works again...
My modifications :
Some help will be very appreciated
//New experimental method
public void AddAssembly(string fatoryKey, Assembly assembly) {
// New kernel query
Configuration nhConfiguration = this._kernel[fatoryKey] as Configuration;
// Old kerney query
Configuration nhConfiguration = this._kernel[typeof(Configuration)] as Configuration;
nhConfiguration.AddAssembly(assembly, true);
ISessionFactory newSessionFactory = nhConfiguration.BuildSessionFactory();
ReplaceSessionFactory(fatoryKey, newSessionFactory);
}
//Overload to keep current behaviour
public void AddAssembly(Assembly assembly){
AddAssembly("nhibernate.factory", assembly);
}
private void cuyahogaSessionFactory_SessionFactoryRebuilt(object sender, EventArgs e){
ISessionFactory newNhSessionFactory = ((SessionFactory)this._kernel[typeof(SessionFactory)]).GetNHibernateFactory();
ReplaceSessionFactory("nhibernate.factory", newNhSessionFactory);
}
private void ReplaceSessionFactory(string fatoryKey, ISessionFactory nhSessionFactory){
this._kernel.RemoveComponent(fatoryKey);
this._kernel.AddComponentInstance(fatoryKey, nhSessionFactory);
}