koenbeuk / EntityFrameworkCore.Projectables

Project over properties and functions in your linq queries
MIT License
260 stars 17 forks source link

Fluent option? #97

Open relfman-cmg opened 7 months ago

relfman-cmg commented 7 months ago

Is it possible to have a fluent option instead of using attributes? It would be nice if I could set this in the entity configuration on the EntityTypeBuilder

builder.Projectable(...)

aradalvand commented 1 month ago

+1 Something like this — that is, being able to mark a property as projectable from the 'outside' — is actually very much needed in onion/clean architecture type projects.

I'm not sure if a fluent builder could work since this is a source generator; if not, then an [assembly: ProjectableAt(typeof(Person), nameof(Person.FullName))] attribute may be a good API.