asp.net mvc - Code first approach about database change -
pretty new of mvc/ef stuff , wondering how handle code first class changes.
i had class point production database retrieve , store information. when defining database context had pointing table, wanted @ view changed it. started going bit loopy , said code migration. view existed , correct.
to correct used setinitializer context false in global.asax , worked fine.
sorry don't have code hand paste , don't know enough write off top of head.
anyhow, question thought hole point of class , context define it, if changed in code wouldn't enough? migration seemed want change or update production database!
is there meta data behind model class , context snaps shots data base in code first accessible should changed or setinitializer correct path use in scenario?
to sure using code first manually code model , define using dbset<> in database context
Comments
Post a Comment