Giter VIP home page Giter VIP logo

cyq.data.projecttool's Introduction

CYQ.Data.ProjectTool

CYQ.Data 框架的枚举或实体类生成工具。(Build Entity or Enum For CYQ.Data)

Foreword:

I have been reminded by netizens that I want to update  the enumeration generator of  CYQ.Data . Since the V4.5 version, this tool has not released a new version. In fact, I also wrote the enumeration generation of V4.55 version. The main body is not satisfied with the main body, and it has not changed much, so it has not been released.

 

Let's take a look at the V4.55 enumeration generator interface, which is a bit better than V4.5, but it is not very satisfactory, and it still feels inconvenient to use.

 

Improvements in the use of ideas:

Since the tossing of Weibo fan elves software for nearly 2 years, I have further understanding of the software, I feel that I use inconvenient things, how can I get the user to use it, so although there is a new version, it has not been released.

 

The idea of ​​the VS plugin:

I used to write the Addin plugin method to integrate into the VS development environment. However, due to many things, I couldn’t write it down, so I didn’t write it. 

Due to the tight reminder of netizens, I started to write the Addin plugin yesterday, ready to get a demo, look at the basic process of Addin, and watch a few online tutorials, which are extremely simple, and the one that reports the error.

After several times of quiet debugging, I found that the English version of the default version of the Chinese version of the local language generated a bug, and after hard work toss, can also produce a menu, click can also produce something.

 

Found "external tools":

But I feel that it is uncomfortable to use Addin to develop, the tool menu is much more, and I realize that this is an "external tool":

 

Click it out:

 

With simple configuration, tools can also be integrated. Once confirmed, you can see the “CYQ.Data Project Configuration” menu in the menu from the previous picture.

 

Compare Addin with external tools:

Addin: It can take some internal information of the VS environment, including open documents, members of the document class, etc. If you want to develop something for the project in the VS solution, such as adding comments to all documents. The class can toss this.

External tools: relatively independent, just introduce a link click, can be developed independently, add external tool integration after completion, suitable for tossing things that are not related to VS internal environment variables, such as CYQ.Data project configuration tool.

 

Determined to use an external tool:

It’s just that I don’t need to deal with the VS environment too much, so the external tool is just right. Since it can be developed independently, based on the idea of ​​making it easy to use, I gave up the idea of ​​re-improving the development on the original enumeration generation tool. , re-writing one, spent a day and night, wrote this configuration tool.

 

The diagram of the CYQ.Data.ProjectTool configuration tool is as follows:

 

 

Example of CS code for a table after ORM pattern generation: 

namespace  Web.Entity.Demo
{
    public  class  the MyUsers: CYQ.Data.Orm.OrmBase
    {
        public  the MyUsers ()
        {
            Base .SetInit ( the this" the MyUsers "" DefaultConn2 " );
        }
        Private  Int32 _ID;
        public  Int32 _ID
        {
            GET
            {
                Return  _ID;
            }
            set
            {
                _ID = value;
            }
        }
        private  String _UserName;
        Public  String _UserName
        {
            get
            {
                return  _UserName;
            }
            set
            {
                _UserName = value;
            }
        }
        private  DateTime _CreateTime;
        public  DateTime _CreateTime
        {
            get
            {
                return  _CreateTime;
            }
            set
            {
                _CreateTime = value;
            }
        }
    }
}

 

Relative improvements to the CYQ.Data project configuration tool:

In this enumeration evolution to configuration tools, mainly to make some subtractive improvements.

1: Generate view and stored procedure enumeration is no longer supported (considering the low usage rate and it is not convenient to move values ​​in different databases).

2: Cancel the "Generate Paging Stored Procedure" and "Generate Log Table" items in the one-time configuration, and the improvements are automatically generated internally in CYQ.Data V5 according to the actual situation.

3: Encoding mode, in addition to the enumeration type, also supports more than one Orm mode. 

4: For the enumeration type encoding method, a cs file of TableNames.cs is finally generated; for the ORM mode, each table generates a corresponding entity class (table name.cs)

5: All configurations are automatically saved, and the latest changed configuration archive is the default configuration, which is convenient for the next change.

 

Through this improvement, plus the integration of external tools, it is quite convenient to use. Click on the "Generate File" button to update the field changes to the data.

 

Tool download:

In order to facilitate the special needs of the changes, this configuration tool, provide source code download.

Download address: http://www.cyqdata.com/download/article-detail-426

 

PS: The configuration tool CYQ.Data.ProjectTool is packaged and downloaded in the CYQ.Data V5 version framework. The source code of the configuration tool is provided separately for download. 

 

cyq.data.projecttool's People

Contributors

cyq1162 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.