DocSpace-client/common/ASC.Core.Common/EF/Context/FilesDbContext.cs
2019-12-10 18:06:51 +03:00

26 lines
701 B
C#

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)
{
return services.AddDbContextManagerService<FilesDbContext>();
}
}
}