mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:56:30 +00:00
add repository with mysql and entities
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user