Skip to content

Auto-configure projectable properties as [NotMapped] #109

@Bretttt

Description

@Bretttt

All IEnumerable<> projectable properties have to be marked as
[NotMapped] or EF throws an error. Example:

[Projectable]
public IEnumerable<MyThings> MySpecialThings => MyThings.Where(t => t.IsSpecial);

EF appears to be trying to map all properties defined as IEnumerable<> or ICollection<> as navigation properties, even if they are get-only (which, needless to say, includes properties like the above).

I could be convinced otherwise, but I would make the case that all projectable properties will always be unmapped.

It would be nice to have this library iterate through the models as part of model building and call .Ignore(theProjectableProperty)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions