2024-12-08 22:57:55 +04:00
|
|
|
|
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; }
|
2024-12-10 19:20:51 +04:00
|
|
|
|
|
|
|
|
|
public RepositoryDbContext(DbContextOptions<RepositoryDbContext> options)
|
|
|
|
|
: base(options)
|
2024-12-08 22:57:55 +04:00
|
|
|
|
{
|
|
|
|
|
}
|
2024-12-11 01:51:02 +04:00
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
modelBuilder.ApplyConfigurationsFromAssembly(typeof(RepositoryDbContext).Assembly);
|
|
|
|
|
}
|
2024-12-08 22:57:55 +04:00
|
|
|
|
}
|
|
|
|
|
}
|