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 have EF Core of version 8.0.1 and MS SQL database. I use DB first approach so I generate DB context and entities from my DB using Scaffold-DbContext command from Visual Studio. There are few issues while generation:
But without !optionsBuilder.IsConfigured I have some exception during runtime. If necessary, I'll show exactly the error but I hope you understand what I'm talking about.
What I want: I want it doesn't remove the condition if (!optionsBuilder.IsConfigured) while updating.
I have an entity class:
public partial class MyEntity
{
...
public MyScheduleTypeEnum ScheduleType { get; set; }
...
}
After update MyScheduleTypeEnum becomes int.
What I want: I want to keep property type as enum.
I have another entity with the following property:
public Dictionary<string, string>? Data { get; set; }
Also I have the following configuration for this property:
builder
.Property(e => e.Data)
.HasConversion(
v => JsonConvert.SerializeObject(v, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }),
v => JsonConvert.DeserializeObject<Dictionary<string, string>>(v, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore })
);
After update this property becomes string? Data instead of Dictionary<string, string>?
What I want: I want to keep property type as Dictionary<string, string>?
Now I manually restore the code above after update. But would be great if I can get rid of this manually work with each update.
Hi,
I have EF Core of version 8.0.1 and MS SQL database. I use DB first approach so I generate DB context and entities from my DB using Scaffold-DbContext command from Visual Studio. There are few issues while generation:
This method changes and becomes as following after update:
But without
!optionsBuilder.IsConfigured
I have some exception during runtime. If necessary, I'll show exactly the error but I hope you understand what I'm talking about.What I want: I want it doesn't remove the condition
if (!optionsBuilder.IsConfigured)
while updating.After update
MyScheduleTypeEnum
becomes int.What I want: I want to keep property type as enum.
public Dictionary<string, string>? Data { get; set; }
Also I have the following configuration for this property:
After update this property becomes
string? Data
instead ofDictionary<string, string>?
What I want: I want to keep property type as
Dictionary<string, string>?
Now I manually restore the code above after update. But would be great if I can get rid of this manually work with each update.
Include provider and version information
EF Core version: 8.0.1
Database provider: Microsoft.EntityFrameworkCore.SqlServer
Target framework: .NET 8.0
The text was updated successfully, but these errors were encountered: