.netentity-framework-4.1universeu2netdk

How to Create EDMX with U2 Toolkit .net 1.1.1 U2NETDK


I am trying to create an Entity Data Model using the new U2 Toolkit .net U2.Data.Client.

I have gone through the EntityFrameWork example that already has a Customer.edmx file created which works fine.

I now want to create my own Entity Data Model but am unsure where to start.

I have tried creating an empty model and manually add my entities but am unsure how to link them to a table.

I have also tried to connect to a Univese database but unsure on how to connect to the database.

Any help please.


Solution

  • We are working on Visual Studio Add-ins for U2 Database. It will allow Server Explorer Integration and hence you can use DataSet Designer or EDM Designer. In Server Explorer, you will see Tables, Views and Subroutines. We will go EAP soon.

    For now , you can do the following:

    Schema xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl" Namespace="Model1.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2005"

    with

    Schema xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl" Namespace="Student.Store" Alias="Self" Provider="U2.Data.Client" ProviderManifestToken="UNIDATA, 07.02.0000"

    <add name="StudentContainer" connectionString="metadata=res://*/Student.csdl|res://*/Student.ssdl|res://*/Student.msl;provider=U2.Data.Client;provider connection string=&quot;Database=demo;User ID=user;Password=pass;Server=localhost;Persist Security Info=True;Pooling=False;ServerType=unidata&quot;" providerName="System.Data.EntityClient"/>
    

    StudentContainer ctx = new StudentContainer(); var q =ctx.Students.ToList();