0

Can I have map a abstract class even the object doesn´t exists in my database?

Example:

public abstract class Type
{
  public string Id{get; set;}
}

And the subs:

public class TypeA : Type
{
}

public class TypeB : Type
{
}

A class who needs the reference to base class:

public class Other
{
  public Type MyType{get; set;}
}

The Type doesn´t exists in my database, but I need this map to references in other classes, how I can map this?

Thanks.

1 Answer 1

1

I´ll let the abstract class like a "fake" map, for now my problem is resolved. Thanks.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.