...... I had to apologize again to the friend who paid attention to DLINQ. Haven't updated the blog for a long time. Because of the changes in the work, but also to rush the deadline, there is no time to pay attention here.
Post a message first. Orcas Beta1, this is beta1, can go to http://www.microsoft.com/downloads/details.aspx? familyid=f10fb5df-e369-4db4-b9a7-845dbf793368&displaylang=en download. Version of May 1. The first April 19 came out one, but did not care. There's another http://www.microsoft.com/downloads/details.aspx? Familyid=36b6609e-6f3d-40f4-8c7d-ad111679d8dc&displaylang=en. One is the self-extracting version and one is virtual PC version. Don't know what the difference is. Not loaded.
In this section, you go to the original plan and change the mapping tool. In the introductory three article, we mentioned the SQLMetal tool. The function of http://www.cnblogs.com/126/archive/2006/09/06/492332.html SQLMetal is to extract the information from the database and generate the mapping code. Orcas also has another tool, that is, O/R Designer.
Let's talk about SQLMetal. Since the last version, SQLMetal has added some new features. For example, support for the sqlce version of SQL Server, support for direct input connection string, and so on. This is SQLMetal's help information, is not more than the last time a lot?
Microsoft (R) Database Mapping Generator 2008 Beta 2 version 1.00.20612
for Microsoft (R). NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
SqlMetal [Options] [<input file>]
generates code and mapping for the LINQ to SQL component the. NET Framework. SqlMetal can:
-Generate source code and mapping attributes or a mapping file from a database.
-Generate A intermediate dbml file for customization from the database.
-Generate code and Mapping attributes or mapping file from a dbml file.
Options:
/server:<name> Database server name.
/database:<name> Database catalog on server.
/user:<name> Login User ID (default:use Windows authentication).
/password:<password> Login Password (default:use Windows authentication).
/conn:<connection string> Database connection string. Cannot be used With/server,/database,/US
er or/password options.
/timeout:<seconds> timeout value to use when SqlMetal accesses the database (default:0 WH
ich means infinite).
/views Extract database views.
/functions Extract database functions.
/sprocs Extract stored procedures.
/dbml[:file] Output as dbml. Cannot be used with/map option.
/code[:file] Output as source code. Cannot be used with/dbml option.
/map[:file] Generate mapping file, not attributes. Cannot be used with/dbml option
.
/language:<language> language for source CODE:VB or C # (default:derived from extension on code file name ).
/namespace:<name> namespace of generated code (Default:no namespace).
/context:<type> Name of data context class (default:derived from Database Name).
/entitybase:<type> base class of entity classes in the generated code (Default:entities have no Base CLA SS).
/pluralize automatically pluralize or Singularize class and member names using 中文版 language rules.
/serialization:<option> Generate serializable Classes:none or unidirectional (default:none).
/provider:<type> Provider Type (Default:provider is determined in run time).
<input file> May is a SqlExpress MDF file, a sqlce SDF file, or a dbml intermediate file.
Create code from SQL Server:
Sqlmetal/server:myserver/database:northwind/code:nwind.cs/namespace:nwind
Generate Intermediate dbml file from SQL Server:
Sqlmetal/server:myserver/database:northwind/dbml:northwind.dbml/namespace:nwind
Generate code with external mapping from DBML:
Sqlmetal/code:nwind.cs/map:nwind.map northwind.dbml
Generate dbml from a sqlce sdf file:
sqlmetal/dbml:northwind.dbml Northwind.sdf
Generate dbml from SqlExpress local server:
sqlmetal/server:.\sqlexpress/database:northwind/dbml:northwind.dbml
Generate dbml by using a connection string in the command line:
sqlmetal/conn: "server= ' myserver ';" Database= ' Northwind ' "/dbml:northwind.dbml