@leo del ciello , Welcome to Microsoft Q&A, We need to make sure that we used .net 6.0 version when we want to use EF core in .NET Core app.
Please refer to the following steps to use ef core in winform app.
First. Please install .NET 6.0 from the following link:
https://dotnet.microsoft.com/en-us/download/dotnet/6.0
Second. Please change your project file into the following:
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
</Project>
Third, Please install the latest version nuget package like the following:
Microsoft.EntityFrameworkCore
Finally, you could use ef core in your winform project.
Best regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.