I am currently working on a ASP.NET project in .NET framework 4.5, using Entity Framework, and working in Visual Studio Express 2012 for web. At this point, I have created a lot of models, context and controllers.
I have also made some classes for importing huge amounts of data into the database from data files. However, at this point it has become clear that the actual import should probably be done through a service or console application.
How do I go about separating the importer code logic from the current project, while retaining all the dependencies to the MVC framework, to put it into a console application project?
- Do I just make the new project depend on the old one?
- The connection string for the database is configured through web.config, and managed by the internal context logic in the old project. How do I use this is the console application?