public class ResourceItemContent : FullAuditedEntity
{
public virtual Guid ResourceItemId { get; protected set; }
[NotNull]
public virtual string Content { get; protected set; }
public override object[] GetKeys()
{
return new object[] {ResourceItemId};
}
}
Problem 1: Wrong base class.
Problem 2: Need to set b.HasKey(), or the migration will not work well. But how do we know what the keys are? (Only GetKeys() in entity class know this information)
The entity code:
Problem 1: Wrong base class.
Problem 2: Need to set
b.HasKey()
, or the migration will not work well. But how do we know what the keys are? (OnlyGetKeys()
in entity class know this information)