Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@MrYossu

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

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