Dynamic Data Entities on VS2010 express
-
- Posts: 54
- Joined: Mon 05 Jul 2010 23:08
Dynamic Data Entities on VS2010 express
Hi.
I'm new to dotConnect for Oracle.
I'd like to use it to replace the default SQL-Server with an Oracle 10G Express edition.
I'm trying to develop a ASP .NET Dynamic Data Entities Web Applications on Visual Web Developer 2010 Express edition.
I have the dotConnect professional, but I don't have any tools on the IDE.
So I used the "Entity Developer" for generate my DataModel.
But, how can I add my model to the project for use it as DataContext? Am I missing something?
Finally... I create the DB tables for use ASP roles (InstallWebTables.sql). How can I add them for use the ASP default classes?
Thank you in advance.
I'm new to dotConnect for Oracle.
I'd like to use it to replace the default SQL-Server with an Oracle 10G Express edition.
I'm trying to develop a ASP .NET Dynamic Data Entities Web Applications on Visual Web Developer 2010 Express edition.
I have the dotConnect professional, but I don't have any tools on the IDE.
So I used the "Entity Developer" for generate my DataModel.
But, how can I add my model to the project for use it as DataContext? Am I missing something?
Finally... I create the DB tables for use ASP roles (InstallWebTables.sql). How can I add them for use the ASP default classes?
Thank you in advance.
1. There are some limitations of dotConnect for Oracle integration in Express Editions of Visual Studio. Please refer to http://www.devart.com/dotconnect/oracle ... ility.html. So try adding components to your toolbox manually as it is described at http://www.devart.com/dotconnect/oracle ... ation.html. Only OracleDataSource and DbLinqDataSource should be available in web projects.
2. If the Devart Entity Model and Devart LinqConnect Model templates are not available via the Project > Add New Item menu of Visual Studio (actually, Entity Developer functionality is applied to these templates), you can run Entity Developer as a separate tool via the Start > All Programs > dotConnect for Oracle menu, and save the generated model to the folder of your project. Then add the generated files of the model to your project (press the Show All Files button in Solution Explorer, and select the Include to Project option in every file context menu).
3. After you have installed the InstallWebTables.sql script, you should register the necessary ASP.NET providers in the *.config file before using them via standard System.Web.* classes. Please refer to http://www.devart.com/dotconnect/oracle ... iders.html.
2. If the Devart Entity Model and Devart LinqConnect Model templates are not available via the Project > Add New Item menu of Visual Studio (actually, Entity Developer functionality is applied to these templates), you can run Entity Developer as a separate tool via the Start > All Programs > dotConnect for Oracle menu, and save the generated model to the folder of your project. Then add the generated files of the model to your project (press the Show All Files button in Solution Explorer, and select the Include to Project option in every file context menu).
3. After you have installed the InstallWebTables.sql script, you should register the necessary ASP.NET providers in the *.config file before using them via standard System.Web.* classes. Please refer to http://www.devart.com/dotconnect/oracle ... iders.html.
Here is a workaround for the Dynamic Data Entities over dotConnect for Oracle.
1. Create a model in Entity Developer.
2. Set the MetaData Artifact Processing property to CopyToOutputDirectory.
3. Change the extension of the generated .edml file to .edmx
4. Add this file to a Visual Web Developer solution.
5. Add the generated metadata files to one of the the solution folders, for example, to Bin.
6. Add a connection string to the web.config file, make sure this connection string points to the folder containing metadata.
7. Change the Build Action property for the .edmx file to "EntityDeploy".
After performing these steps evrything should work smoothly.
1. Create a model in Entity Developer.
2. Set the MetaData Artifact Processing property to CopyToOutputDirectory.
3. Change the extension of the generated .edml file to .edmx
4. Add this file to a Visual Web Developer solution.
5. Add the generated metadata files to one of the the solution folders, for example, to Bin.
6. Add a connection string to the web.config file, make sure this connection string points to the folder containing metadata.
7. Change the Build Action property for the .edmx file to "EntityDeploy".
After performing these steps evrything should work smoothly.
-
- Posts: 54
- Joined: Mon 05 Jul 2010 23:08
I have used the following string:
Don't forget to make changes in the connection string used in the generated code in order to use this connection string, like in the following example:
Code: Select all
Code: Select all
public SCOTTModelEntities() :
base(@"name=SCOTTEntities", "SCOTTEntities")
{
OnContextCreated();
}
-
- Posts: 54
- Joined: Mon 05 Jul 2010 23:08
-
- Posts: 54
- Joined: Mon 05 Jul 2010 23:08
-
- Posts: 54
- Joined: Mon 05 Jul 2010 23:08
I tried but doesn't work!
I have the follow exception:
I did the follow:
1) Go to the MyModel.Designer.cs and change the code as you told me:
from:
to:
2) Change the web.config to put the connection string named "MyModel"
What I miss or what I did wrong?
PS: All my files are with the check "CopyAlways" and I see them in the output directory
Thank you in advance!
I have the follow exception:
Code: Select all
The specified metadata path is not valid. A valid path must be either an existing directory, an existing file with extension '.csdl', '.ssdl', or '.msl', or a URI that identifies an embedded resource.
1) Go to the MyModel.Designer.cs and change the code as you told me:
from:
Code: Select all
base(@"metadata=....", "MyModel")
Code: Select all
base(@"name=MyModel", MyModel)
What I miss or what I did wrong?
PS: All my files are with the check "CopyAlways" and I see them in the output directory
Thank you in advance!