You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd probably called this "Materialized Projectioables".
I would like the ability to optionally include a projectable property so that it's projected into the primary entity when it's loaded so that I don't need the related data to be included on the entity without having to include the related data.
Take this example:
publicclassMyEntity{publicGuidId{get;set;}publicMyOtherEntityMyOtherEntity{get;set;}=null!;publicGuidMyOtherEntityId{get;set;}[Projectable(UseMemberBody(nameof(MyOtherEntityName))
public string MyOtherEntityNameIncluded {get;set;}[Projectable] public string MyOtherEntityName =>this.MyOtherEntity.Name;}
public class MyOtherEntity
{publicGuidId{get;set;}publicstringName{get;set;}... a lot of other properties and potentially nested owned relationships so loading this entity isexpensive}
dbContext.DbSet<MyEntity>.Include(_ =>_.MyOtherEntityNameIncluded)// or maybe something custom
dbContext.DbSet<MyEntity>.Materialize(_ =>_.MyOtherEntityNameIncluded)
If I don't have the materialized properties, I would have to o:
Activity
yinzara commentedon Oct 23, 2023
I would REALLY love this feature as well.
I'd probably called this "Materialized Projectioables".
I would like the ability to optionally include a projectable property so that it's projected into the primary entity when it's loaded so that I don't need the related data to be included on the entity without having to include the related data.
Take this example:
If I don't have the materialized properties, I would have to o:
which is extremely inefficient
zoriya commentedon Oct 23, 2023
When #86 gets merged, you would not need anything for your
.MyOtherEntityNameIncludedto work.would already include your
MyOtherEntityNameIncluded.