Skip to content

Add string-based Property API that does not require a type #6303

@ajcvickers

Description

@ajcvickers

When creating a shadow property it is important to know the type of that property:

builder.Entity<Foo>().Property<int>("Id");

But if string API is actually being used to reference a CLR property, then it would be nice to be able to do this:

builder.Entity<Foo>().Property("Id");

This API would throw if the "Id" property is not found, but if it is found, then its type will be used.
This becomes especially nice when mapping fields, since this requires that the string API be used:

builder.Entity<Foo>().Property("_id");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions