persistence/Persistence.Database.Postgres/PersistencePostgresContext.cs

24 lines
629 B
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure.Internal;
namespace Persistence.Database.Model;
/// <summary>
/// EF <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> Postgres
/// </summary>
public partial class PersistencePostgresContext : PersistenceDbContext
{
public PersistencePostgresContext(DbContextOptions options)
: base(options)
{}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.HasPostgresExtension("adminpack")
.HasAnnotation("Relational:Collation", "Russian_Russia.1251");
base.OnModelCreating(modelBuilder);
}
}