You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public abstract class Entity : EntityBase
{
public DateTime CreatedOn { get; set; }
public string CreatedBy { get; set; }
}
And then for lookup tables I do not want these so I created another..
public abstract class EntityLookup : EntityBase
{
}
And for the entity I say..
public class RfCategory : EntityLookup
{
public RfCategory()
{
RfReports = new HashSet();
}
……
But it says this.. Any idea why ? Or am I going about this the wrong way? The main idea is I want entities to inherit differently depending on the type of table..
1>Repositories\IRfCategoryRepository.cs(10,22,10,43): error CS0311: The type 'Pwdx.Core.Entities.RfCategory' cannot be used as type parameter 'T' in the generic type or method 'IRepository'. There is no implicit reference conversion from 'Pwdx.Core.Entities.RfCategory' to 'Pwdx.Core.Entities.Base.Entity'.
The text was updated successfully, but these errors were encountered:
So I have Normal entity which always includes
public abstract class Entity : EntityBase
{
public DateTime CreatedOn { get; set; }
And then for lookup tables I do not want these so I created another..
public abstract class EntityLookup : EntityBase
{
And for the entity I say..
public class RfCategory : EntityLookup
{
public RfCategory()
{
RfReports = new HashSet();
}
……
But it says this.. Any idea why ? Or am I going about this the wrong way? The main idea is I want entities to inherit differently depending on the type of table..
1>Repositories\IRfCategoryRepository.cs(10,22,10,43): error CS0311: The type 'Pwdx.Core.Entities.RfCategory' cannot be used as type parameter 'T' in the generic type or method 'IRepository'. There is no implicit reference conversion from 'Pwdx.Core.Entities.RfCategory' to 'Pwdx.Core.Entities.Base.Entity'.
The text was updated successfully, but these errors were encountered: