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
Hi, I'm the author of Pomelo.EntityFrameworkCore.MySql. Since we have supported json db type, we have an issue in json type migrations.
If we add or remove a JsonObject<T> field which T is a generic collection, the generated migrations C# code missing the namespace System.Collections.Generic.(Both 20160819XXX_xxxxx.cs and XXXModelSnapshot.cs)
The following code is the result of migration generator generated.
usingSystem;usingMicrosoft.EntityFrameworkCore;usingMicrosoft.EntityFrameworkCore.Infrastructure;usingMicrosoft.EntityFrameworkCore.Metadata;usingMicrosoft.EntityFrameworkCore.Migrations;usingMyCatSample;namespaceMyCatSample.Migrations{[DbContext(typeof(SampleContext))]partialclassSampleContextModelSnapshot:ModelSnapshot{protectedoverridevoidBuildModel(ModelBuildermodelBuilder){modelBuilder.HasAnnotation("ProductVersion","1.0.0-rtm-21431");modelBuilder.Entity("MyCatSample.Blog", b =>{b.Property<long>("Id").ValueGeneratedOnAdd();b.Property<string>("Content");b.Property<JsonObject<List<string>>>("Tags");// Missing namespace System.Collections.Genericb.Property<DateTime>("Time");b.Property<string>("Title");b.HasKey("Id");b.ToTable("Blogs");});}}}
How should I fix the migration c# code generator to add the namespace in?
The text was updated successfully, but these errors were encountered:
yukozh
changed the title
Migration generator missing the namespace System.Collections.Generic
Migration generator missing the namespace System.Collections.Generic in MySQL for ef core
Aug 19, 2016
Hi, I'm the author of Pomelo.EntityFrameworkCore.MySql. Since we have supported json db type, we have an issue in json type migrations.
If we add or remove a
JsonObject<T>
field which T is a generic collection, the generated migrations C# code missing the namespaceSystem.Collections.Generic
.(Both20160819XXX_xxxxx.cs
andXXXModelSnapshot.cs
)The following code is the result of migration generator generated.
How should I fix the migration c# code generator to add the namespace in?
@rowanmiller @natemcmaster
The text was updated successfully, but these errors were encountered: