2019-12-09 11:59:22 +00:00
|
|
|
|
using ASC.Core.Common.EF.Model;
|
|
|
|
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace ASC.Core.Common.EF.Context
|
|
|
|
|
{
|
|
|
|
|
public class FilesDbContext : BaseDbContext
|
|
|
|
|
{
|
|
|
|
|
public DbSet<FilesConverts> FilesConverts { get; set; }
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
modelBuilder.AddFilesConverts();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class FilesDbExtension
|
|
|
|
|
{
|
|
|
|
|
public static IServiceCollection AddFilesDbContextService(this IServiceCollection services)
|
|
|
|
|
{
|
2019-12-10 15:06:51 +00:00
|
|
|
|
return services.AddDbContextManagerService<FilesDbContext>();
|
2019-12-09 11:59:22 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|