add repository with mysql and entities

This commit is contained in:
Oleksandr Bezdieniezhnykh
2024-07-16 14:18:55 +03:00
parent 32c92fedf2
commit bfbfdf6658
18 changed files with 331 additions and 3 deletions
@@ -0,0 +1,26 @@
using Azaion.Repository.Entities;
using LinqToDB.Mapping;
namespace Azaion.Repository;
public static class AzaionDbSqlSchemaHolder
{
public static readonly MappingSchema MappingSchema;
static AzaionDbSqlSchemaHolder()
{
MappingSchema = new MappingSchema();
var builder = new FluentMappingBuilder(MappingSchema);
builder.Entity<User>()
.HasIdentity(x => x.Id);
builder.Entity<Media>()
.HasIdentity(x => x.Id);
builder.Entity<Annotation>()
.HasIdentity(x => x.Id);
builder.Build();
}
}