EF Model snapshot dev vs prod

Laurent Guigon 81 Reputation points


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.
426 questions
{count} votes