EF Model snapshot dev vs prod

Laurent Guigon 276 Reputation points
2023-01-12T10:22:25.5+00:00

Hi,

I've an app with EF core, Model First. I created a seed data set for testing my an during the dev phase. I'd like to generate my prod DB, but the dev data are inserted in my prod db. That's an issue...

I use the #If DEBUG verb to exclude data from my seed method, but it still here when I run the update-data command in release mode, due to the snapshot

How can I exclude the dev sample from my db generation ?

Thx in advance.

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
697 questions
{count} votes