Skip to content

EF Core compatibility #152

Description

@arteny

Describe the bug

Using Visual Studio EF Core, I am adding Intellenum column property (ChannelId type).
Then if I am adding migration (with code-first approach), I get the error:
Unable to create a 'DbContext' of type 'MyDb'. The exception 'The entity type 'ChannelId' requires a primary key to be defined. If you intended to use a keyless entity type, call 'HasNoKey' in 'OnModelCreating'. For more information on keyless entity types, see https://go.microsoft.com/fwlink/?linkid=2141943.' was thrown while attempting to create an instance. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728
Looks like it is going to create separate table for this type values, when I expect just column type with type int.
So when it is working for Vogen value objects, for Intellenum it is not.
Is it possible to add such EF Core compatibility?

Steps to reproduce

  1. Add Intellenum property to db entity class.
  2. Run add-migration

Expected behaviour

No error, Intellenum property is mapped as it's underlying type for column type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions