EntityFramework.Docs icon indicating copy to clipboard operation
EntityFramework.Docs copied to clipboard

add virtual keyword to properties

Open rominator1983 opened this issue 11 months ago • 1 comments

virtual seems to be missing as pointed out in the comments of this answer: https://stackoverflow.com/a/22708800 I also needed that for the migration to work at all.

rominator1983 avatar Mar 21 '24 22:03 rominator1983

That comment only seems to say that a DbSet property is needed, not that it must necessarily be virtual. You definitely shouldn't need to make DbSet properties virtual; if you're running into issues, can you please open an issue on the main EF Core repo with a full, runnable code sample?

roji avatar Mar 22 '24 09:03 roji