Fluent option?
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(...)
+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.
being able to mark a property as projectable from the 'outside' — is actually very much needed
This library needs access to the syntax when it generates a companion expression. Anything that lives on the outside does not come with Syntax. EntityFrameworkCore.Projectables.Abstractions has no reference to EFCore and exists for that reason. You can reference it in your abstraction projects and mark things as Projectable as needed`
Anything that lives on the outside does not come with Syntax.
Yeah you're actually right, fair enough.
EntityFrameworkCore.Projectables.Abstractions has no reference to EFCore and exists for that reason.
There would still be a conceptual dependency on EF though, so kind of a leaky abstraction.