在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:PomeloFoundation/Pomelo.EntityFrameworkCore.MySql开源软件地址:https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql开源编程语言:C# 99.9%开源软件介绍:Pomelo.EntityFrameworkCore.MySql
CompatibilityDependenciesThe following versions of MySqlConnector, EF Core, .NET (Core), .NET Standard and .NET Framework are compatible with published releases of
Packages
Supported Database Servers and Versions
Currently supported versions are:
Schedule and Roadmap
Nightly BuildsTo use nightly builds from our Azure DevOps feed, add a <?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 Started1. Project ConfigurationEnsure that your <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.1" /> 2. Services ConfigurationAdd 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 ApplicationCheck 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 4. Read the EF Core DocumentationRefer to Microsoft's EF Core Documentation for detailed instructions and examples on using EF Core. Scaffolding / Reverse EngineeringUse the EF Core tools to execute scaffolding commands:
ContributeOne 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 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论