EasyToMySql 1.0.1

EasyToMySql or ETM will help you making better connection experience to MySql.
When you can just type the target table, host or .. address instead of defining and making instances of MySql libraries.

Install-Package EasyToMySql -Version 1.0.1
dotnet add package EasyToMySql --version 1.0.1
<PackageReference Include="EasyToMySql" Version="1.0.1">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add EasyToMySql --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

To use this library you should add this namespace at the top of your code:
using EasyToMySql;

There are three functions to get value from the database or make a change on it, also there is no Constructor for running on instantiation.
At first, you should call the Open() method and give it the required parameters to make your connection open. It is really simple, you need to give it your Hostname, Database name, Username, Password, Charset and the connection encryption status with a boolean type that is defined False for running local projects without any bug.
This method will generate the ConnectionString for you based on the given parameters, also it will open a connection to the target database and close it for test reasons; If you want to know the result of this function, you can print the output of the method like this:

Connect oConnect = new Connect(); - Making an instance

oConnect.Open( Hostname , Database , UTF8 , Username , Password , false); -This method will generate the ConnectionString based on the given values.

Console.WireLine(oConnect.Open(Hostname , Database , UTF8 , Username , Password , false)); - Output: "Connection established successfully."

Now you can execute your own queries, use the properties that generated by methods, pass the values to MySql library as this package depends on it and because of this library is created based on OpenSource concepts & values, there is no Sealed class to let you develop it locally based on your usage.

Also, there were 2 other methods for the first release of it.
The first one is the Inserter function, with the Inserter you can add Values to the preferred Fields of your target Table.
It is easier than the upper method and it should be used to insert values into the database.
Example code is just like this:

oConnect.Inserter( Example Table, &quot;user_Id, user_Name&quot; , &quot;NULL, Milad&quot; ); -Remember the ConnectionString generated in the previous method and you need to give the requested values to let this function work correctly.

The second one is Deleter method. Deleter accepts three parameters as its arguments, those are the table name that can be given from the Table property of the library and the target Field with its Integral Id to remove it after the query execution.
Example code is just like this:

oConnect.Deleter( Example Table, user_Id , 1); -You can also give Table property of library instead of writing its name repeatedly.

To use this library you should add this namespace at the top of your code:
using EasyToMySql;

There are three functions to get value from the database or make a change on it, also there is no Constructor for running on instantiation.
At first, you should call the Open() method and give it the required parameters to make your connection open. It is really simple, you need to give it your Hostname, Database name, Username, Password, Charset and the connection encryption status with a boolean type that is defined False for running local projects without any bug.
This method will generate the ConnectionString for you based on the given parameters, also it will open a connection to the target database and close it for test reasons; If you want to know the result of this function, you can print the output of the method like this:

Connect oConnect = new Connect(); - Making an instance

oConnect.Open( Hostname , Database , UTF8 , Username , Password , false); -This method will generate the ConnectionString based on the given values.

Console.WireLine(oConnect.Open(Hostname , Database , UTF8 , Username , Password , false)); - Output: "Connection established successfully."

Now you can execute your own queries, use the properties that generated by methods, pass the values to MySql library as this package depends on it and because of this library is created based on OpenSource concepts & values, there is no Sealed class to let you develop it locally based on your usage.

Also, there were 2 other methods for the first release of it.
The first one is the Inserter function, with the Inserter you can add Values to the preferred Fields of your target Table.
It is easier than the upper method and it should be used to insert values into the database.
Example code is just like this:

oConnect.Inserter( Example Table, &quot;user_Id, user_Name&quot; , &quot;NULL, Milad&quot; ); -Remember the ConnectionString generated in the previous method and you need to give the requested values to let this function work correctly.

The second one is Deleter method. Deleter accepts three parameters as its arguments, those are the table name that can be given from the Table property of the library and the target Field with its Integral Id to remove it after the query execution.
Example code is just like this:

oConnect.Deleter( Example Table, user_Id , 1); -You can also give Table property of library instead of writing its name repeatedly.

Release Notes

First release.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 259 2/9/2018