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'm trying to store an array of json data in a column in EF
I'd like to have support for top-level Json Arrays for JsonColumns in EFCore.
Right now I have to create an empty wrapper class whose only job is to have a collection property and make that my JsonColumn via OwnsOne() and ToJson().
I'd like to be able to do OwnsMany() and ToJson() on a property which is a List and it just works.
E.g. I'd like to be able to do this:
public class SomeEntity
{
public List<SomeOtherClass> Values = new List<SomeOtherClass>();
}
public class SomeEntity_Map : IEntityTypeConfiguration<SomeEntity>
{
public void Configure(EntityTypeBuilder<SomeEntity> builder)
{
builder.OwnsMany(x => x.Values,x => x.ToJson());
}
}
The text was updated successfully, but these errors were encountered:
I'm trying to store an array of json data in a column in EF
I'd like to have support for top-level Json Arrays for JsonColumns in EFCore.
Right now I have to create an empty wrapper class whose only job is to have a collection property and make that my JsonColumn via OwnsOne() and ToJson().
I'd like to be able to do OwnsMany() and ToJson() on a property which is a List and it just works.
E.g. I'd like to be able to do this:
The text was updated successfully, but these errors were encountered: