Aromyroirumma
New Member
I'm currently using EF5 to connect to SQL Server 2012 Express and have got to the stage where a large amount of repeatable Seed Data would be good for testing purposes. I already have a (self-created, from another project) tool which just needs a little tweaking to output a large amount of XML seed data.What would be really nice would be, in my C# Seed function, simply to pass a connection string to my DbContext class to enable it to import all the data from the XML file, using the same POCO classes I use for my Model. I could then simply copy all the data in to my standard DbContext (parameterless initialisation, connects to SQL Server).I can deal with copying the data and outputting it to SQL Server, but is it even possible to specify a connection string to import the seed data from an XML file in this way?