Sylin.Koan.Data.Connector.MySql
1.0.107
dotnet add package Sylin.Koan.Data.Connector.MySql --version 1.0.107
NuGet\Install-Package Sylin.Koan.Data.Connector.MySql -Version 1.0.107
<PackageReference Include="Sylin.Koan.Data.Connector.MySql" Version="1.0.107" />
<PackageVersion Include="Sylin.Koan.Data.Connector.MySql" Version="1.0.107" />
<PackageReference Include="Sylin.Koan.Data.Connector.MySql" />
paket add Sylin.Koan.Data.Connector.MySql --version 1.0.107
#r "nuget: Sylin.Koan.Data.Connector.MySql, 1.0.107"
#:package Sylin.Koan.Data.Connector.MySql@1.0.107
#addin nuget:?package=Sylin.Koan.Data.Connector.MySql&version=1.0.107
#tool nuget:?package=Sylin.Koan.Data.Connector.MySql&version=1.0.107
Sylin.Koan.Data.Connector.MySql
Use MySQL or MariaDB as the record store behind Koan's existing Entity API.
Use the connector
Reference Sylin.Koan.Data.Connector.MySql; keep the application's single AddKoan() call.
dotnet add package Sylin.Koan.Data.Connector.MySql
public sealed class Todo : Entity<Todo>
{
public string Title { get; set; } = "";
public bool Done { get; set; }
}
var todo = await new Todo { Title = "Ship it" }.Save(ct);
var open = await Todo.Query(item => !item.Done, ct);
No MySQL repository or registration API is required.
Configure MySQL or MariaDB
Use a normal MySqlConnector connection string when discovery is not appropriate:
{
"ConnectionStrings": {
"MySql": "Server=localhost;Port=3306;Database=Koan;User ID=root;Password=mysql"
}
}
Koan:Data:MySql:ConnectionString is the provider-scoped alternative. A mysql:// URI is accepted and normalized; recognized MySqlConnector options may be supplied as query parameters. Unknown URI options fail before opening a connection.
For a named source, configure the standard source connection and select it with EntityContext.Source(...). The database in that source's final connection string is its storage boundary unless a source-scoped MySQL Database setting explicitly overrides it.
Guarantees and limits
- The supported server lines are MySQL 8.4 and MariaDB 11.8 LTS.
- The configured database must already exist. Managed lifecycle can create Entity tables; it does not create databases.
- Production table creation additionally requires
AllowProductionDdl=true; Koan never infers production DDL consent. - Managed tables use InnoDB. An existing non-InnoDB table is rejected because atomic-batch semantics cannot be claimed for it.
SchemaMatching=Relaxedstill requires every mapped storage column, the exact primary key, and compatible identity/JSON shapes.Strictadditionally verifies every mapped column's native type, nullability, and generated-column shape.- Filters execute in MySQL, and paging adds a stable identity tiebreak.
- Managed row-scope values are stored in the Entity JSON document and guard conflicting writes.
- Unreachable endpoints, unresolved
auto, unconfigured named sources, denied DDL/write access, and incompatible schemas fail at the connector boundary.
MariaDB exposes its JSON alias as validated LONGTEXT and retains legacy integer display widths in
schema metadata. The connector recognizes those exact server representations; an ordinary unchecked
LONGTEXT does not satisfy a structured mapping. The same mysql adapter key, options, connection
strings, query behavior, and Entity grammar apply to both server families.
Enum storage contract
Default Entity storage preserves enum names as strings, including nullable values, nested values, collections, and declared EnumMember aliases. Unnamed numeric values fail instead of silently changing the storage format. Queries use the same spelling. Ordinary enum ordering uses declared ordinal ranks in native expressions while the stored value stays a string; native ordering of arbitrary Flags combinations rejects correctively. An explicit external mapping codec remains responsible for its declared physical representation. Existing numeric rows or columns require a separate, explicit migration; upgrades do not rewrite them automatically.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.10)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.10)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.10)
- Microsoft.Extensions.Configuration.Json (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Hosting (>= 10.0.10)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging (>= 10.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Logging.Console (>= 10.0.10)
- Microsoft.Extensions.Options (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.10)
- MySqlConnector (>= 2.6.1)
- Newtonsoft.Json (>= 13.0.4)
- Sylin.Koan.Core (>= 1.0.39 && < 2.0.0)
- Sylin.Koan.Data.Abstractions (>= 1.0.41 && < 2.0.0)
- Sylin.Koan.Data.Core (>= 1.0.73 && < 2.0.0)
- Sylin.Koan.Data.Relational (>= 1.0.60 && < 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.107 | 114 | 9/13/2026 |
| 1.0.104 | 103 | 9/12/2026 |
| 1.0.100 | 100 | 9/12/2026 |
| 1.0.98 | 105 | 9/10/2026 |
| 1.0.94 | 106 | 9/10/2026 |
| 1.0.90 | 109 | 9/9/2026 |
| 1.0.86 | 102 | 9/9/2026 |
| 1.0.82 | 95 | 9/9/2026 |
| 1.0.77 | 101 | 9/9/2026 |
| 1.0.75 | 103 | 9/9/2026 |
| 1.0.70 | 112 | 9/5/2026 |
| 1.0.69 | 118 | 8/30/2026 |
| 1.0.67 | 103 | 8/30/2026 |
| 1.0.65 | 107 | 8/28/2026 |
| 1.0.64 | 95 | 8/28/2026 |
| 1.0.63 | 109 | 8/28/2026 |
| 1.0.62 | 102 | 8/28/2026 |
| 1.0.61 | 106 | 8/28/2026 |
| 1.0.60 | 108 | 8/27/2026 |
| 1.0.55 | 118 | 8/25/2026 |