Ok, I found a Workaround, for everybody who would ever also need this.
1) You have to download Entity Developer Pro (or the right version for you)
If you have an other dotConnect product, it doesn't work, because it Looks
that These Versions are restricted to there product.
2) Open the lqml file with an Editor. There you find the following 2 lines (the
second and the third line int the file, they look like this:
Code: Select all
<Database Name="****" EntityNamespace="InvoiceContext" ContextNamespace="InvoiceContext" Class="InvoiceDataContext" xmlns:ed="http://devart.com/schemas/EntityDeveloper/1.0" ed:Guid="3a383a28-2522-4a23-91c8-e8aa63b110bf" [u]Provider="Devart.Data.MySql.Linq.Provider.MySqlDataProvider, Devart.Data.MySql.Linq" Extended="true" [/u]xmlns="http://schemas.devart.com/linqconnect/mapping">
<Connection Mode[u]="ConnectionString" ConnectionString="User Id=*;Host=*;Port=*;Database=*;Persist Security Info=False" Provider="Devart.Data.MySql"[/u] />
This example Show you the MySQL Version
So, Change These two lines with the MSSql Version like this:
Code: Select all
<Database Name="*" EntityNamespace="InvoiceContext" ContextNamespace="InvoiceContext" Class="InvoiceDataContext" xmlns:ed="http://devart.com/schemas/EntityDeveloper/1.0" ed:Guid="3a383a28-2522-4a23-91c8-e8aa63b110bf" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
<Connection Mode="ConnectionString" ConnectionString="Data Source=*;Initial Catalog=*;Integrated Security=True;Persist Security Info=True" Provider="System.Data.SqlClient" />
The next Change you have to made is:
Let's say your database is called "DataBase" - So, you will find all tables build to:
But in MsSQL, all Table objects are called "dbo"
So Change "
DataBase." to "
dbo."
The database will be sent through the Catalog Statement!
3) Now you can open the lqml file with the Entity Developer (Don't use the Visual Studio plugged in one, I don't know why, but it Ends up, that the custom tool want open)
4) Once the file is opend in the Entity Developer you will see many Errors. - That's OK - Right click and open the Model settings. - Now you can choose from the
-Syncronisation -> Mapping the right MSSql Server Version.
5) Now you have to delete the Template on the left side of the overview. And add a new template (follow this short wizzard to find the right one for you)
6) SAFE THE FILE!!!!!
7) Regenerate the code.
That's it. - Now the complete code Generation has swapped from dotConnect to XXXX to MsSQL Version.
Happy coding...