mirror of https://gitee.com/IoTSharp/Gateways.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
670 B
C#
24 lines
670 B
C#
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace IoTSharp.Gateways.Data
|
|
{
|
|
public class ApplicationDbContext : IdentityDbContext
|
|
{
|
|
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
|
|
: base(options)
|
|
{
|
|
if (Database.GetPendingMigrations().Count() > 0)
|
|
{
|
|
Database.Migrate();
|
|
}
|
|
}
|
|
|
|
public DbSet<Client> Clients { get; set; }
|
|
|
|
public DbSet<ModbusMapping> ModbusMappings { get; set; }
|
|
|
|
|
|
public DbSet<OPCUAMapping> OPCUAMappings { get; set; }
|
|
}
|
|
} |