Giter Club home page Giter Club logo

pomelo.entityframeworkcore.mysql's Introduction

Pomelo.EntityFrameworkCore.MySql

Build Status NuGet Pomelo.EntityFrameworkCore.MySql package in pomelo-efcore-public feed in Azure Artifacts Join the chat at https://gitter.im/PomeloFoundation/Home

Pomelo.EntityFrameworkCore.MySql is the most popular Entity Framework Core provider for MySQL compatible databases. It supports EF Core up to its latest version and uses MySqlConnector for high-performance database server communication.

Compatibility

Dependencies

The following versions of MySqlConnector, EF Core, .NET (Core), .NET Standard and .NET Framework are compatible with published releases of Pomelo.EntityFrameworkCore.MySql:

Release Branch MySqlConnector EF Core .NET (Core) .NET Standard .NET Framework
6.0.1 master >= 2.1.2 6.0.x 6.0+ - -
5.0.4 5.0-maint >= 1.3.13 5.0.x 3.0+ 2.1 -
3.2.7 3.2-maint >= 0.69.10 < 1.0.0 3.1.x 2.0+ 2.0 4.6.1+

Packages

Supported Database Servers and Versions

Pomelo.EntityFrameworkCore.MySql is tested against all actively maintained versions of MySQL and MariaDB. Older versions (e.g. MySQL 5.6) and other server implementations (e.g. Amazon Aurora) are usually compatible to a high degree as well, but are not tested as part of our CI.

Currently supported versions are:

  • MySQL 8.0
  • MySQL 5.7
  • MariaDB 10.6
  • MariaDB 10.5
  • MariaDB 10.4
  • MariaDB 10.3

Schedule and Roadmap

Milestone Status Release Date
6.0.1 Released 2022-01-22
5.0.4 Released 2022-01-22
3.2.7 Released 2021-10-04

Nightly Builds

To use nightly builds from our Azure DevOps feed, add a NuGet.config file to your solution root with the following content and enable prereleases:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <add key="Pomelo" value="https://pkgs.dev.azure.com/pomelo-efcore/Pomelo.EntityFrameworkCore.MySql/_packaging/pomelo-efcore-public/nuget/v3/index.json" />
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    </packageSources>
</configuration>

Getting Started

1. Project Configuration

Ensure that your .csproj file contains the following reference:

<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" />

2. Services Configuration

Add Pomelo.EntityFrameworkCore.MySql to the services configuration in your the Startup.cs file of your ASP.NET Core project:

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        // Replace with your connection string.
        var connectionString = "server=localhost;user=root;password=1234;database=ef";

        // Replace with your server version and type.
        // Use 'MariaDbServerVersion' for MariaDB.
        // Alternatively, use 'ServerVersion.AutoDetect(connectionString)'.
        // For common usages, see pull request #1233.
        var serverVersion = new MySqlServerVersion(new Version(8, 0, 27));

        // Replace 'YourDbContext' with the name of your own DbContext derived class.
        services.AddDbContext<YourDbContext>(
            dbContextOptions => dbContextOptions
                .UseMySql(connectionString, serverVersion)
                // The following three options help with debugging, but should
                // be changed or removed for production.
                .LogTo(Console.WriteLine, LogLevel.Information)
                .EnableSensitiveDataLogging()
                .EnableDetailedErrors()
        );
    }
}

View our Configuration Options Wiki Page for a list of common options.

3. Sample Application

Check out our Integration Tests for an example repository that includes an ASP.NET Core MVC Application.

There are also many complete and concise console application samples posted in the issue section (some of them can be found by searching for Program.cs).

4. Read the EF Core Documentation

Refer to Microsoft's EF Core Documentation for detailed instructions and examples on using EF Core.

Scaffolding / Reverse Engineering

Use the EF Core tools to execute scaffolding commands:

dotnet ef dbcontext scaffold "Server=localhost;User=root;Password=1234;Database=ef" "Pomelo.EntityFrameworkCore.MySql"

Contribute

One of the easiest ways to contribute is to report issues, participate in discussions and update the wiki docs. You can also contribute by submitting pull requests with code changes and supporting tests.

We are always looking for additional core contributors. If you got a couple of hours a week and know your way around EF Core and MySQL, give us a nudge.

License

MIT

pomelo.entityframeworkcore.mysql's People

Contributors

caleblloyd avatar lauxjpn avatar yukozh avatar mguinness avatar andriysvyryd avatar applenele avatar bgrainger avatar csboling avatar nover avatar xcellsoft avatar twsl avatar maumar avatar pkiers avatar erolkskn avatar bartjed avatar joepb avatar akamyshanov avatar wiredbarb avatar ralmsdeveloper avatar luckywraptor avatar lordmike avatar pedro-pedrosa avatar neogeneva avatar prince269090 avatar rafaelblink avatar reed-jones avatar rynaret avatar robbieknuth avatar crozone avatar sgielen avatar

Stargazers

Alejandro Jesus del Campillo Jaime avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.