22 lines
619 B
C#
22 lines
619 B
C#
using Domain.Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Persistence
|
|
{
|
|
public class RepositoryDbContext : DbContext
|
|
{
|
|
public DbSet<Region> Regions { get; set; }
|
|
public DbSet<City> Cities { get; set; }
|
|
public DbSet<Street> Streets { get; set; }
|
|
|
|
public RepositoryDbContext(DbContextOptions<RepositoryDbContext> options)
|
|
: base(options)
|
|
{
|
|
}
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
modelBuilder.ApplyConfigurationsFromAssembly(typeof(RepositoryDbContext).Assembly);
|
|
}
|
|
}
|
|
}
|