dotnet / aspire

Tools, templates, and packages to accelerate building observable, production-ready apps
https://learn.microsoft.com/dotnet/aspire
MIT License
3.89k stars 469 forks source link

Add MySQL Aspire Component #786

Closed eerhardt closed 9 months ago

eerhardt commented 1 year ago

We will probably have both EF and non-EF components (just like the other database components).

https://www.nuget.org/packages/MySql.EntityFrameworkCore https://www.nuget.org/packages/MySql.Data

bgrainger commented 1 year ago

I am incredibly biased here, since I am the author of MySqlConnector, but I would strongly advocate for https://www.nuget.org/packages/MySqlConnector/ to be the preferred library for MySQL. Some reasons:

  1. Better License: MIT instead of GPL
  2. OSS development at https://github.com/mysql-net/MySqlConnector; MySql.Data releases code snapshots quarterly but does not have an open development process
  3. MySqlConnector supports DbBatch, DbDataSource, and other new ADO.NET abstractions that have been introduced in recent .NET versions; MySql.Data does not.
  4. MySqlConnector has been async-first since the earliest versions; MySql.Data lacked any async support for the last ten years, then shipped with serious async bugs for six months.
  5. MySqlConnector has a much more robust suite of integration tests and fewer outstanding known issues.
  6. Popularity: the community has recognized the above advantages and MySqlConnector has more downloads even though it's a newer package.

I'm sure Aspire could have components for both MySqlConnector and MySql.Data, but if it's going to be an "opinionated stack" (emphasis in original), I know which opinion I want it to have. 😀

bgrainger commented 1 year ago
  1. AspNetCore.HealthChecks.MySql already uses MySqlConnector.
eerhardt commented 1 year ago

Re-opening to track adding an EF based component.

davidfowl commented 11 months ago

Putting this in preview2 but it'll likely make it for preview3 unless @bgrainger can get this done before next Tuesday 😄

mitchdenny commented 11 months ago

This appears to be in.

bgrainger commented 11 months ago

Per https://github.com/dotnet/aspire/issues/786#issuecomment-1817404908 it's not done, as the MySQL EF Core component (Pomelo) isn't in yet.

DamianEdwards commented 11 months ago

I'm assuming the EF Core component is tracking a later preview now?