2020-02-17 08:58:14 +00:00
|
|
|
|
using ASC.Common;
|
|
|
|
|
using ASC.Core.Common.EF.Model;
|
2019-12-10 15:06:51 +00:00
|
|
|
|
|
2019-12-04 11:40:42 +00:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
|
|
namespace ASC.Core.Common.EF.Context
|
|
|
|
|
{
|
|
|
|
|
public class AccountLinkContext : BaseDbContext
|
|
|
|
|
{
|
|
|
|
|
public DbSet<AccountLinks> AccountLinks { get; set; }
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
modelBuilder.AddAccountLinks();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class AccountLinkContextExtension
|
|
|
|
|
{
|
2020-02-17 08:58:14 +00:00
|
|
|
|
public static DIHelper AddAccountLinkContextService(this DIHelper services)
|
2019-12-04 11:40:42 +00:00
|
|
|
|
{
|
2019-12-10 15:06:51 +00:00
|
|
|
|
return services.AddDbContextManagerService<AccountLinkContext>();
|
2019-12-04 11:40:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|