VKinfotek Inc.
  • Us
    About Us
    Contact Us
  • FAQs
  • Ready Software
    Ready ERP ASP Core Software for Azure Cloud
    Ready Web ERP Software
    Ready ASP.Net Azure Software
    Ready C# SQL Server Accounting Software
    Ready ASP.Net MVC and EF Software
First slide
Earn $100/hour in USA! Click Here

create sales order management data model using edmgen exe tool

In this article we will learn how to create an Entity Data Model using the command line utility - EdmGen.exe. The EdmGen.exe command tool is used not only for creating an entity data model but also to validate an entity data model and create object classes from the Conceptual schema definition language file.

The EdmGen.exe command line tool generates the Entity Data Model which contains three files.

.csdl - Conceptual schema definition language - this is also called as Conceptual layer
.msl - Mapping schema definition Language - mapping layer
.ssdl - Storage schema definition Language - storage layer

In the previous article we have shown how to create Entity Data Model using ADO.NET Entity Data Model Designer. If we create Entity Data Model using ADO.NET Entity Data Model Designer, the single .edmx file contains the .csdl, .msl and .ssdl.

If we create Entity Data Model using EdmGen.exe, the files .csdl, .msl and .ssdl are created separately.

The main command line switches we will use with EdmGen.exe command line tool are:

/mode:ViewGeneration
If we use the above switch with EdmGen.exe command line, it precompiles queries into a source file.

/mode:FullGeneration
Creates cSDL,MSL and SSDL files from the database.
It also creates classes and precompile queries for each entity.


/mode:ValidateArtifacts
Validates an Entity Data Model.


/language:Csharp
/language:VB
The above two swiches are for creating code in chosen languages.

/mode:FromSsdlGeneration
Generates .MSL, CSDL and Entity Classes from the SSDL file

/mode:EntityClassGeneration
As name indicates this switch generates classes from the CSDL file.

/provider:
Specifies the name of the ADO.NET data provider.

/connectionstring:
specifies the connection string to be used to connect to the database

/namespace:
Specify the namespace

To create the Entity Data Model for our SalesOrderManagement database, type the following in a command window. In the below code, I have used /mode:fullgeneration switch. We need to pass the connectionstring and the project parameter. The name given to the project parameter is used to create all the files. As the switch indicates it will generate full Entity data model for the database.

edmgen /mode:fullgeneration /c:"Data Source=.;Initial Catalog= SalesOrderManagement;User ID=sa; Password=XXXX;" /p:SoModel

We have seen how to create an Entity Data Model using the command line utility - EdmGen.exe. Having created the Entity data model, we can query the model using the following ways.

LINQ to Entities
Entity SQL
Using methods - LINQ methods
Using methods - Entity framework's ObjectQuery class
Querying using EntityFramework's EntityClient API.


Click here to know how to query Entity data model.

Entity Framework Articles
  • add an entity to associated entities
  • entity framework entity data model
  • entity framework orm object relational mapper
  • querying entity data model using objectcontext
  • using ado net entity data model in windows applications.html
  • create entity data model using ado.net entity framework designer in visual studio
  • create-sales-order-management-data-model-using-edmgen-tool.html
  • display data in a gridview using ado.net entity data source control
  • ways of querying entity data model
  • query entity data model using linq to entities
  • query entity data model with object services and entity sql
  • query entity data model using linq methods
  • parameterized objectquery against a entity data model
  • query entity data model entity client
  • linq to entities query with projections in c#
  • entity framework - save changes to entities
  • insert new objects in entity framework
  • deleting entities using deleteobject() method of objectcontext
  • binding ado.net entity framework to a listbox in c#
  • entity framework load method
  • eager loading using include method in entity framework
  • entity framework - retrieving a single entity
Most Viewed

Azure Q & A
Azure Platform
Grid-View
GridView CommandField example
Details-View
GridView and DetailsView Master/Detail page using SqlDataSource control
POCO
POCO overview and advantages - POCO class, Entity Framework in Enterprise Applications
Entity Framework
Query entity data model using linq to entities
Array List
Difference between arraylist and list collection
Web Services
How to create a Web service using Visual Studio.net
Form-View
FormView DataBound Event
Object Oriented Programming
Calling base class constructor in C#
Linq
Convert a sequence to a generic list using ToList()method
Project Ideas
Project ideas for students
AccountingSoftware
Accounting Software
MVC
Creating an ASP.Net MVC 3 application
.Net
Using assemblies in .net applications
ASP .Net
How to implement form validation using ASP.Net 2.0 Validation Controls
VB .Net
Constructors in Visual Basic.Net


  • SITEMAP
  • Terms of use
  • Testimonials

Back to top

Copyright © 2016 - All Rights Reserved - VKInfotek.com