2020-10-24 23:23:22 +02:00
|
|
|
|
using Birdmap.DAL.Entities;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System.Diagnostics.CodeAnalysis;
|
|
|
|
|
|
|
|
|
|
namespace Birdmap.DAL
|
|
|
|
|
{
|
|
|
|
|
public class BirdmapContext : DbContext
|
|
|
|
|
{
|
|
|
|
|
public DbSet<User> Users { get; set; }
|
2020-10-25 16:52:39 +01:00
|
|
|
|
public DbSet<Service> Services { get; set; }
|
2020-10-24 23:23:22 +02:00
|
|
|
|
|
2020-10-25 16:15:06 +01:00
|
|
|
|
public BirdmapContext([NotNull] DbContextOptions<BirdmapContext> options) : base(options)
|
2020-10-24 23:23:22 +02:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
modelBuilder.ApplyConfigurationsFromAssembly(typeof(BirdmapContext).Assembly);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|