DocSpace-buildtools/common/ASC.Core.Common/EF/CoreDbContext.cs

17 lines
458 B
C#
Raw Normal View History

2019-11-29 12:26:53 +00:00
using Microsoft.EntityFrameworkCore;
namespace ASC.Core.Common.EF
{
public class CoreDbContext : BaseDbContext
{
public DbSet<EFTariff> Tariffs { get; set; }
public DbSet<EFButton> Buttons { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<EFButton>()
.HasKey(c => new { c.TariffId, c.PartnerId });
}
}
}