-1
List<Type> entityMappings = new List<Type>();
IEnumerable<Type> allTypesInThisAssembly = Assembly.GetExecutingAssembly().GetTypes();
foreach (Type type in allTypesInThisAssembly)
{
if (type.GetInterface(typeof(ClassMapping<>).Name.ToString()) != null)
{
entityMappings.Add(type);
}
}
I tried that way, but it didn’t work.
Explain your problem better, what exactly you’re trying to do and why?
– Leandro Angelo
Sorry it took me so long to respond. Basically doing the configuration to add a Nhibernate Singleton, and I was having trouble with addMapping, and for that, I needed Nhibernate to have an example class. that in Example of my code I used Student Map. But after a lot of research, I was able to solve.
– Jodaías Silva
So, that’s what you should have written in your question....
– Leandro Angelo