Festival spree! XSql open source, open source plug-ins, Sofire v1.6 open source (uploaded)

With an essay on SOFIRE v1.5 concept version - X-SQL has passed nearly two months. Not fully tested by the internal, Sofire Suite ushered in the beta version of v1.6. This will open source and test procedures, and dedicated to XSql of Visual Studio Add-In.

Damages on XSql syntax, refer to the essay. 1.6 1.5 grammar and syntax is essentially the same. This article will focus on how to use XSql, and related tools XSql introduction.

=== === address

Sofire Suite v1.6 open source address (including XSQL, XSqlModelGenerator) (uploaded)

Download example

XSqlModelGenerator plugin download

Source is turtle speed upload, sample code and plug-in code has been uploaded .

1, download XSqlModelGenerator.AddIn.rar plug.

2, shut down all Visual Studio, will XSqlModelGenerator.AddIn.rar unzip the files in the "My Documents \ Visual Studio 2010 \ Addins" or "My Documents \ Visual Studio 2012 \ Addins."

3, open Visual Studio, and open a project, you can see in the toolbar, or right-click the project [], [] and [directory] entry time:

RightClickItemToolCommandItem

1, open XSqlModelGenerator (test program, run the program once, when you first start the program, it will automatically generate two tables)

XSqlMain

2, if it is a new project, or click the upper left corner of the Configure button will pop up:

XSqlSettingForm

3, model (the so-called Entity or Model) and XSql can be placed different items, click the Browse button to the right of the pop-up:

image

This is a "project or directory" option that supports multiple projects.

4. Click the Build button in the upper right corner, it will generate the following files:

image

5, before generating, if the same path already exists Models, is covered, and the old files to:

image

If XSql file already exists, it will not be covered.

1. Open an XSQL file:

image

2, XSql Editor

image

3, write a XSql, Gif following is a small picture:

XSqlCoding

4, the implementation of a XSql, Gif following is a small picture:

InsertOne

1, generates two files: XSqlFormDemo \ Models \ UsersModel.cs and XSqlFormDemo \ XSqls \ UsersModel.xsql , of course, also comprise operations to create or modify files xsql.setting.

2, UsersModel.cs contains three objects.

image

These include

1, ______ Model: The original model class field contains correspondence table set.

2, ______ XSqlParameters: parameter set correspondence table comprising the combination field parameter set.

3, Db ______: static function is responsible for interacting with the database.

Point 2 and point 3 of the content is very important, but also easy to develop a lot of work everyday. But focuses on the content of these essays is not Benpian.

The contents of the entire essay, describes the use of tools and XSql some demonstration effect, it does not involve explain its principles. If you are interested in the content, you can leave a message, or download the source code to study.

Thanks!

Reproduced in: https: //www.cnblogs.com/sofire/archive/2012/10/08/sofire_v1_6_and_xsql.html

Guess you like

Origin blog.csdn.net/weixin_33830216/article/details/92637029