Dear Sirs,
we are working on a migration from MS SQL Server to MySQL.
At the moment we are using a LINQ-to-SQL entity class (dbml file) for the database stored in a MS SQL Server. We created an identical database with alls tables, views and stored procedures on a MySQL server.
My questions are:
- What is the best way to migrate the existing LINQ-to-SQL class to MySQL?
- Do you have any tutorials or other documents we should begin with?
- Is there a way to let customers choose, which server they want to use?
Many thanks in advance!
Best Regards
Bodo
Migrate from MS SQL Server to MySQL
Re: Migrate from MS SQL Server to MySQL
If you are working with dotConnect for MySQL and, according to your post, there is already an identical database with all tables, views and stored procedures on a MySQL server, you can just create a new LinqConnect model with all necessary objects and generate the code.What is the best way to migrate the existing LINQ-to-SQL class to MySQL?
If you are working with LinqConnect (as a separate product), you can do it via the LinqConnect Migration Wizard (Tools-> LinqConnect-> Migration wizard), which allows migrating from a LINQ to SQL model to a LinqConnect model.
After completing the steps of the LinqConnect Migration Wizard and getting the *.lqml file, you should do the following in your application:
- open the model (*.lqml file);
- select "New Template" from the shortcut menu of the "Templates" node in Model Explorer and then select the "LinqConnect" template;
- save changes and re-generate your model.
After saving the model, the code for DataContext and its entities should be generated.
Please inform us if this helps.
LinqConnect documentation is available here:Do you have any tutorials or other documents we should begin with?
http://www.devart.com/linqconnect/docs/?
http://www.devart.com/linqconnect/demo.html
LinqConnect samples are available in the "C:\Program Files (x86)\Devart\dotConnect\Linq\Samples\" folder after installing LinqConnect (if the Samples component has been selected during installation).
You could create XML mapping files for each database and switch between them by changing the connection string and the mapping file:Is there a way to let customers choose, which server they want to use?
Code: Select all
TestDataContext context = new TestDataContext(connectionString1, mappingSource1);
Code: Select all
TestDataContext context = new TestDataContext(connectionString2, mappingSource2);
http://forums.devart.com/viewtopic.php?f=31&t=24588
Also, please pay attention to the Fluent mapping approach: http://www.devart.com/linqconnect/docs/ ... pping.html