I learned from the garden that many of my friends know what mysoft is, but do not know where to start development.
Mysoft is relatively complicated for a person who just understands it, but should be said to be very flexible after being familiar with it.
Next, we will teach you how to use mysoft. Data.ProgramLet's go!
1. First, download all DLL libraries and generation tools required for mysoft. Data from the Internet
If you only need to do access, sqlserver, and Oracle development, you only need to download the mini version.
Ii. Install the vs.net entity generation plug-in
Decompress lib_v2.7.2.rar to a folder. This folder cannot be deleted at will, and both the generation tool and DLL will be referenced from here.
If your development tool uses vs, open the setupentityvsplugin.exe. config file with the upload script.
Modify the following configurations as follows.
Configuration corresponding to vs.net 2008
<? XML version = "1.0" encoding = "UTF-8" ?> < Configuration > < Appsettings > < Add Key = "Addinversionname" Value = "2008" /> < Add Key = "Addinversionno" Value = "9.0" /> </ Appsettings > </ Configuration >
Configuration corresponding to vs.net 2005
<? XML version = "1.0" encoding = "UTF-8" ?> < Configuration > < Appsettings > < Add Key = "Addinversionname" Value = "2005" /> < Add Key = "Addinversionno" Value = "8.0" /> </ Appsettings > </ Configuration >
After configuration, double-click setupentityvsplugin.exe to automatically install the plug-in vs.net.
3. Use an entity generation tool to generate an object
There are two ways to generate an object:
1. generate an interface, and then generate an object through the interface
2. directly generate entities (this method is generally used)
The following describes the simplest method to directly generate an object.
Double-click mysoft.tools.entitydesign.exe to open the object generation tool. The interface is as follows:
Taking the northwind data as an example to generate an object:
1. Configure the database connection string, select the database type, and click Connect server.
2. Open vs.net to create a C # Or VB.net class library project.
The project name I created is as follows:
3. Check the "generate entity directly from database" option and set the namespace!
First, select the output type. Currently, C # And VB.net are supported. C # is selected by default. Most friends in the garden should use C.
Set the output namespace to mysoftexample. dataentity.
On the left side, you need to generate an object table. You can select all or none of the tables above.
All Views listed below can also be selected or not selected. Note: views cannot be added, deleted, or modified and can only be used for queries.
Then click the generate object button. Note: When you hook up the "generate entity directly from database" button, the "generate entity interface" button will become "generate entity"
The result is as follows:
There are two ways to process the generated results:
1. Generate files for each class separately
Select the folder where the project is located and click generate multiple files. A class file is generated for each class.
Then you can include these files in the project:
Click project> show all files> select the generated File> right-click and select include in project.
2. generate all classes to a file:
Create a class file in the project and change it to entities. CS.CodeCopy to this file.
By now, all generated entities have been completed.
To make the project compiled successfully, add mysoft. Data. DLL to this plugin.
Any questions can be found here: mysoft component problem feedback and troubleshooting
The next chapter describes how to use the generated entity to add, delete, modify, and delete data.