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 have a project based on WinUI 3, and I try to using Entity Framework Core with Generic Host in my Enterprise App.
Unfortunately, Entity Framework Core could not find any migration strategy when, I use App.xaml.cs (I think it is another bug), So I have to using Program.cs and <DefineConstants>DISABLE_XAML_GENERATED_MAIN</DefineConstants>.
After that, I can successfully create migration.
But for my CTO quality requirements, we have to use DatabaseFactory and UnitOfWork patterns in Program.cs for Initializing Database like below
Describe the bug
ITNOA
I have a project based on WinUI 3, and I try to using Entity Framework Core with Generic Host in my Enterprise App.
Unfortunately, Entity Framework Core could not find any migration strategy when, I use
App.xaml.cs
(I think it is another bug), So I have to usingProgram.cs
and<DefineConstants>DISABLE_XAML_GENERATED_MAIN</DefineConstants>
.After that, I can successfully create migration.
But for my CTO quality requirements, we have to use DatabaseFactory and UnitOfWork patterns in Program.cs for Initializing Database like below
In this case after I try to migration, My
LocalDB
crash.Note: I try this approach in many many ASP.NET Core application, and we have not any problem.
Steps to reproduce the bug
Expected behavior
Create Migration successfully
Screenshots
NuGet package version
Windows App SDK 1.3.2: 1.3.230602002
Packaging type
Packaged (MSIX), Unpackaged
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
Full
InitializeDatabase
method like belowThe text was updated successfully, but these errors were encountered: