Skip to content

yonglehou/Pomelo.Data.MySql

Repository files navigation

Pomelo.Data.MySql

Travis build status AppVeyor build status NuGet

Contains MySQL implementations of the System.Data.Common(Both .NET Core and .NET Framework) interfaces.

Getting Started

To add the Pomelo.Data.MySql into your project.json:

{
  "version": "1.0.0-*",
  "buildOptions": {
    "emitEntryPoint": true
  },

  "dependencies": {
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0"
    },
    "Pomelo.Data.MySql": "1.0.0-prerelease-20160726"
  },

  "frameworks": {
    "netcoreapp1.0": {
      "imports": "dnxcore50"
    }
  }
}

MySqlConnection, MySqlCommand and etc were included in the namespace Pomelo.Data.MySql. The following console application sample will show you how to use this library to write a record into MySQL database.

using Pomelo.Data.MySql;

namespace MySqlAdoSample
{
    public class Program
    {
        public static void Main(string[] args)
        {
            using (var conn = new MySqlConnection("server=localhost;database=adosample;uid=root;pwd=yourpwd"))
            {
                conn.Open();
                using (var cmd = new MySqlCommand("INSERT INTO `test` (`content`) VALUES ('Hello MySQL')", 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

MIT

About

Contains MySQL implementations of the System.Data.Common(Both .NET Core and .NET Framework) interfaces.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages