Skip to content

Can we create an Entity framework model using custom types? #21

Description

@MrYossu

Take the Age type from chapter 3 as an example (source code).

Suppose I want to create a Person class, that EF will map to a table...

  public class Person
  {
    public int Id { get; set; }
    public string Name { get; set; } = "";
    public Age Age { get; set; }
  }

I don't want Age to be mapped to a table, but can't see a way of convincing EF Core about this.

Anyone any ideas? Can we even use custom types with EF Core?

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions