Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create lookup entites that inherit differently than data entites ? #3

Open
punkouter2021 opened this issue Aug 22, 2019 · 0 comments

Comments

@punkouter2021
Copy link

So I have Normal entity which always includes

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'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant