entity framework - Easy data initialization of CodeFirst database via XML or similar format -
has published generic database initializer capable of taking xml file (or other file representation) of database contents , using initialize code-first database in seed method?
i'm thinking of uses reflection populate database. realize there lot of fun head fk relationships, if such tool existed, if bi-directional, handy. unfortunately google-fu failing me.
just wanted make sure wasn't missing something...i've got awful lot of init code throw away...
are talking actual data itself? in case, xml , reflection overkill. put data in db, , re-export insert statements:
what best way auto-generate insert statements sql server table?
then, in seed methods (or initializedatabase()), read in exported file , use context.database.executesqlcommand().
Comments
Post a Comment