PomeloFoundation / Pomelo.data.mycat
Licence: mit
Contains MyCat (An open source MySQL cluster proxy which based on Cobar) implementations of the System.Data.Common(Both .NET Core and .NET Framework) interfaces.
Stars: ✭ 37
Pomelo.Data.MyCat
Contains MyCat (An open source MySQL cluster proxy which based on Cobar) implementations of the System.Data.Common(Both .NET Core and .NET Framework) interfaces.
Getting Started
To add the Pomelo.Data.MyCat
into your project.json
:
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
},
"Pomelo.Data.MyCat": "1.0.0"
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
MyCatConnection
, MyCatCommand
and etc were included in the namespace Pomelo.Data.MyCat
. The following console application sample will show you how to use this library to write a record into MyCat database.
using Pomelo.Data.MyCat;
namespace MyCatAdoSample
{
public class Program
{
public static void Main(string[] args)
{
using (var conn = new MyCatConnection("server=localhost;database=adosample;uid=root;pwd=yourpwd"))
{
conn.Open();
using (var cmd = new MyCatCommand("INSERT INTO `test` (`content`) VALUES ('Hello MyCat')", conn))
{
cmd.ExecuteNonQuery();
}
}
}
}
}
Contribute
One of the easiest ways to contribute is to participate in discussions and discuss issues. You can also contribute by submitting pull requests with code changes.
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].