I am using Entity Developer Linq to SQL and I wanted to know where is the best place tell the DataContext what connection string to use?
You can set connection via Entity Developer:
- check that "Use the following connection string from App.Config" is selected in the Model Properties;
- open Database Explorer and right-click on Database Connection-> Edit Connection Properties;
- change connection to the necessary one and save the changes.
Also you can set connection in the code:
Code: Select all
TestDataContext context = new TestDataContext(connectionString);
I wonder if I can recreated it so it is class per file, I don't see an empty partial class for the datacontext but I do see the partial created by the designer. Is there some setting in the designer setting I need to change to create the empty partial, the one the designer will not override?
Set the "Generate Partial Class" option to True in the Properties of the used template and the files of the partial classes will be generated (these files are generated only once when the model is created and they are not regenerated after any changes to the model to save your manual changes).
Shouldn't that be Devart.Data.Linq and Devart.Data.Linq.Mapping?
No, it shouldn't. LinqConnect is our own ORM solution, closely compatible to Microsoft LINQ to SQL:
http://www.devart.com/linqconnect/ .
LinqConnect provides support for SQL Server, Oracle, MySQL, PostgreSQL and SQLite, and includes visual model designer - Entity Developer. With Entity Developer which is bundled with LinqConnect, you will be able to work with the LinqConnect models against SQL Server (Standard edition) and Oracle, MySQL, PostgreSQL and SQLite (Professional edition).
There is no LinqConnect support in Entity Developer Professional (separate product). Entity Developer Professional Edition allows designing models for NHibernate, Entity Framework, and LINQ to SQL (not LinqConnect):
http://www.devart.com/entitydeveloper/editions.html
What versions of the Devart dll's should I have referenced? Where are they devart dlls? I didn't see them in GAC.
You shouldn't add any Devart assemblies when working with Entity Developer and LINQ to SQL. Devart assemblies are required for LinqConnect support.
I am convinced your Linq to SQL template doesn't generate the correct code.
Please describe the exact steps you are performing,
send us the exact code you are getting after these steps and the code you are expecting to get.