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

32 lines
860 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; }
2020-05-29 14:48:27 +00:00
public DbSet<BackupSchedule> Schedules { get; set; }
public DbSet<DbTenant> Tenants { get; set; }
public DbSet<DbTariff> Tariffs { get; set; }
public BackupsContext() { }
public BackupsContext(DbContextOptions<BackupsContext> options)
: base(options)
{
}
}
2020-06-10 12:35:10 +00:00
public static class BackupsContextExtension
{
2020-06-10 12:35:10 +00:00
public static DIHelper AddBackupsContext(this DIHelper services)
{
return services.AddDbContextManagerService<BackupsContext>();
2020-06-10 12:35:10 +00:00
}
}
}