I've got a class Project
and a class Case
, which inherits from Project
.
When having a list of Projects
we might decide later on to make a Case
of the selected Project
. How can I achieve this?
Project:
[ActiveRecord (Table = "projects", Lazy = true), JoinedBase]
public class Project : ActiveRecordValidationBase<Project>
{
private int _id;
[PrimaryKey(PrimaryKeyType.Identity, "id")]
public virtual int Id
{
get { return _id; }
set { _id = value; }
}
}
Case:
[ActiveRecord(Table = "cases", Lazy = true)]
public class Case : Project
{
private int _caseId;
[JoinedKey("case_id")]
public virtual int CaseId
{
get { return _caseId; }
set { _caseId = value; }
}
}
I hope my subject and problem are clear :)