init
This commit is contained in:
22
watcher-monitoring/Data/WatcherDbContext.cs
Normal file
22
watcher-monitoring/Data/WatcherDbContext.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.Data.Common;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using watcher_monitoring.Data;
|
||||
using watcher_monitoring.Models;
|
||||
|
||||
namespace watcher_monitoring.Data;
|
||||
|
||||
public class WatcherDbContext : DbContext
|
||||
{
|
||||
private readonly IConfiguration _configuration;
|
||||
|
||||
public WatcherDbContext(DbContextOptions<WatcherDbContext> options, IConfiguration configuration)
|
||||
: base(options)
|
||||
{
|
||||
_configuration = configuration;
|
||||
}
|
||||
|
||||
public DbSet<Server> Servers { get; set; }
|
||||
public DbSet<User> Users { get; set; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user