'Entity Framework auto generate DbContext class from database table in C# preserve virtual property
I have some tables that have some property modifiers set to virtual. I want to be able to auto-generate a DbContext
class without stripping those virtual keywords from the properties.
I've tried dotnet ef dbcontext scaffold
but it strips virtual out.
I've also tried dotnet ef dbcontext update
but I get an error that states update isn't a recognized cmdlet.
I'm using EF Core 5.0. Can someone please help with this if it is even possible? I've googled for a solution but couldn't find one.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|