I have the following classes called:
public class Parent
{
public string Field1;
public string Field2;
}
public class Child : Parent
{
public string Field3;
}
I now have a list of Child objects and I need to pass then into a function that is looking for a Parent class.
What is the best way to convert Child class back to the Parent class (I don't care about field3 at this point)?
I am using NHibernate and when I pass in the child class and try to save it, I get this error:
No persister for: ChildClass
even though the 'Parent' class has a persister.