EasyToMySql 1.0.1

.NET Framework 4.5
dotnet add package EasyToMySql --version 1.0.1
NuGet\Install-Package EasyToMySql -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<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
#r "nuget: EasyToMySql, 1.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install EasyToMySql as a Cake Addin
#addin nuget:?package=EasyToMySql&version=1.0.1

// Install EasyToMySql as a Cake Tool
#tool nuget:?package=EasyToMySql&version=1.0.1

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, "user_Id, user_Name" , "NULL, Milad" ); -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.

Product Versions
.NET Framework net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 845 2/9/2018

First release.