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
|
|
|
|
|
{
|
2020-10-05 09:27:15 +00:00
|
|
|
|
public class AccountLinkContext : BaseDbContext
|
2019-12-04 11:40:42 +00:00
|
|
|
|
{
|
|
|
|
|
public DbSet<AccountLinks> AccountLinks { get; set; }
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
2020-09-06 22:49:03 +00:00
|
|
|
|
ModelBuilderWrapper
|
|
|
|
|
.From(modelBuilder, Provider)
|
|
|
|
|
.AddAccountLinks()
|
|
|
|
|
.Finish();
|
2019-12-04 11:40:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|