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.
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:
Now replace this line :
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″
In SSDL, add the following
Save the File.
One content two views
StudentContainer ctx = new StudentContainer();
var q =ctx.Students.ToList();