DocSpace-buildtools/common/services/ASC.Data.Backup/EF/Context/BackupsContext.cs

32 lines
862 B
C#
Raw Normal View History

using ASC.Common;
using ASC.Core.Common.EF;
using ASC.Core.Common.EF.Model;
using ASC.Data.Backup.EF.Model;
using Microsoft.EntityFrameworkCore;
namespace ASC.Data.Backup.EF.Context
{
public class BackupsContext : BaseDbContext
{
public DbSet<BackupRecord> Backups { get; set; }
public DbSet<Schedule> Schedules { get; set; }
public DbSet<DbTenant> Tenants { get; set; }
public DbSet<DbTariff> Tariffs { get; set; }
public BackupsContext() { }
public BackupsContext(DbContextOptions<BackupsContext> options)
: base(options)
{
}
}
public static class BackupRecordContextExtension
{
public static DIHelper AddBackupContext(this DIHelper services)
{
return services.AddDbContextManagerService<BackupsContext>();
}
}
}