17 lines
580 B
C#
17 lines
580 B
C#
using Core.Blueprint.Domain.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Core.Blueprint.DAL.Infrastructure.Context
|
|
{
|
|
public sealed class SqlServerContext : DbContext
|
|
{
|
|
public SqlServerContext(DbContextOptions options) : base(options) { }
|
|
public DbSet<SampleItem> BlueprintTests { get; set; }
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
base.OnModelCreating(modelBuilder);
|
|
modelBuilder.Entity<SampleItem>().Property(p => p.Id).HasConversion(a => a, b => b);
|
|
}
|
|
}
|
|
}
|