Code Generation Tool (sqlmetal.exe and edmbuilder (edmgen.exe)

Source: Internet
Author: User
Tags xslt
CodeGenerate tool (sqlmetal.exe)

 

The sqlmetal command line tool can generate code and ing for the. NET Framework's LINQ to SQL component. By applying the options next to this topic, you can instruct sqlmetal to perform several different operations, including:

    • Generate from databaseSource codeAnd ing properties or ing files.

    • Generate an intermediate database Markup Language (. dbml) file for custom use from the database.

    • Generate code and ing attributes or ing files from the. dbml file.

By default, the sqlmetal file is locatedDrive: \ Program Files \ microsoft sdks \ windows \ vN. nn\ Bin.

Http://msdn.microsoft.com/zh-cn/library/bb386987.aspx

 

EDM generator (edmgen.exe)

 

Edmgen.exe is a command line tool used to process the Entity Data Model (EDM. You can use the edmgen.exe tool to perform the following tasks:

    • By using the. NET Framework data specific to the data sourceProgramConnect to the data source and generate the ing (. MSL) files used by the conceptual model (. CSDL), storage model (. SSDL), and EDM. For more information, seeHow to: Use edmgen.exe to generate an object data model (Entity Framework).

    • Verify the existing model. For more information, seeHow to: Use edmgen.exe to verify the Object Data Model.

    • Generate a C # Or Visual Basic code file containing the object class generated from the conceptual model (. CSDL) file. For more information, seeHow to: Use edmgen.exe to generate an object model file (Entity Framework).

    • Generate a C # Or Visual Basic code file that contains the pre-generated view of the existing model. For more information, seeHow to: Pre-generate views to improve query performance (Entity Framework).

The edmgen.exe tool is installed in the. NET Framework directory. In many cases, it is located in c: \ windows \ Microsoft. NET \ framework \ v3.5. You can also access the edmgen.exe tool (click"Start", Pointing"All Programs","Microsoft Visual Studio 2008","Visual Studio Tools"And then click"Visual Studio 2008 command prompt").

Http://msdn.microsoft.com/zh-cn/library/bb387165.aspx

Use: generate the entire entity model.
Edmgen/mode: fullgeneration/provider: system. Data. sqlclient/C: "Server = servername; database = northwind; Integrated Security = true"/Project: northwind

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.