I want to use an abstract base class for entities, which is not mapped on any table:
public abstract class Entity { public virtual int Id { get; private
make setter of id in entity class protected :
public abstract class Entity { public virtual int Id { get; protected set; } }
i tried this . it will be work