I get this error: Unable to cast object of type \'NHibernate.Collection.Generic.PersistentGenericSet1[IocWinFormTestEntities.People]\'
I have the following base class. public abstract class BaseEntity { public virtual long Id { get; set; }
Say I have these models: public class Person { public virtual int Id { get; private set; } public virtual ICollection<Address> Addresses { get; private set; }
Given the classes below: public class Address : Place { public virtual string Street { get; set; } public virtual int Number{ get; set; }
Trying to get my head round automapping. I am having a problem when trying to automap my domain and generate the database. Im sure its something simple im doing wrong.
All my persistent objects have a property which should not be persisted. At this moment i generate my automapping like this:
Ok, firstly I hope this makes sense. I\'m trying to use fluent auto mappings for my app based around the following idea.
I\'m pretty new to auto-mapping, and even newer to ValueInjecter.I\'m sorry if this is an easy question, but I can\'t seem to find the answer anywhere.
My problem is that when I remove an object from the one to many relationship the child records get orphaned as opposed to deleted. I\'m not sure if it the way I have set up my domain model or I\'m not
Let\'s say I have an abstract base class defined as follows: public abstract class CompanyBase : EntityBase<CompanyBase>