c# - Resetting Context for Entity Framework 5 so it thinks its working with a initialised Database - Code First -


linked question:

cannot split table ef 5 - code first - existing database

but think answer question not problem code first did whilst developing.

the scenario this:

  1. had existing database , used begin creating data context
  2. began working realised naming conventions poor , tables needed remodelling.
  3. decided create new database better conventions existing tables taken across , remodelled new bits
  4. updated context @ new database
  5. even though migrations not enabled, getting errors database being out of sync (even though until morning still pulling data)
  6. i enabled migrations (comment in other question) , output script. , can see sync changes things table names , id properties etc.

i can't move forwards, context seems not when switch databases on (which point brittle). need somehow reset context doesn't think changes have been made database , thinks working initial database again.

i have deleted migrations folder, nothing. there sort of way can happen?

try deleting __migrationhistory table in database. it's system one.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -