Dynamic Data Entities on VS2010 express

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Dynamic Data Entities on VS2010 express

Post by JoeRuspante » Mon 05 Jul 2010 23:14

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 07 Jul 2010 13:04

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.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 23 Jul 2010 14:16

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.

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Thu 05 Aug 2010 23:30

Thank you in advance...
I tried your solution and seems to starts... but how can I set the connection string on Web.config?

What name have I to use? ConnectionString? Connection? ...

Thank you a lot

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 06 Aug 2010 13:55

I have used the following string:

Code: Select all

    
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

        public SCOTTModelEntities() : 
                base(@"name=SCOTTEntities", "SCOTTEntities")
        {
            OnContextCreated();
        }

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Fri 06 Aug 2010 18:17

Thank you a lot, but I can't read all the code you post (my browser doesn't show it because the page ends)

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Fri 06 Aug 2010 18:46

Sorry! I didn't know that "copy/paste" could let me see also the words "out of browser"...

So, I used the copy/paste and found all the connection string settings.

Thank you a lot (later I will test it)

JoeRuspante
Posts: 54
Joined: Mon 05 Jul 2010 23:08

Post by JoeRuspante » Sat 07 Aug 2010 04:48

I tried but doesn't work!

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.
I did the follow:

1) Go to the MyModel.Designer.cs and change the code as you told me:

from:

Code: Select all

base(@"metadata=....", "MyModel")
to:

Code: Select all

base(@"name=MyModel", MyModel)
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!

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 09 Aug 2010 15:18

Could you please send me (support * devart * com, subject "Dynamic Date Entities") a test project illustrating the problem?

Post Reply