DocSpace-client/common/ASC.Core.Common/EF/Context/DbContext.cs

26 lines
697 B
C#
Raw Normal View History

2019-12-12 15:24:47 +00:00
using ASC.Core.Common.EF.Model;
using Microsoft.EntityFrameworkCore;
2019-12-13 11:37:58 +00:00
using Microsoft.Extensions.DependencyInjection;
2019-12-12 15:24:47 +00:00
namespace ASC.Core.Common.EF.Context
{
public class DbContext : BaseDbContext
{
public DbSet<MobileAppInstall> MobileAppInstall { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.AddMobileAppInstall();
}
}
2019-12-13 11:37:58 +00:00
public static class DbContextExtension
{
public static IServiceCollection AddDbContextService(this IServiceCollection services)
{
return services.AddDbContextManagerService<DbContext>();
}
}
2019-12-12 15:24:47 +00:00
}