refactor: move database-related projects to a separate folder
This commit is contained in:
17
SqlData/Persistence/Contexts/Schedule/FacultyDbContext.cs
Normal file
17
SqlData/Persistence/Contexts/Schedule/FacultyDbContext.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Mirea.Api.DataAccess.Application.Interfaces.DbContexts.Schedule;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
using Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.Contexts.Schedule;
|
||||
|
||||
public class FacultyDbContext(DbContextOptions<FacultyDbContext> options) : DbContext(options), IFacultyDbContext
|
||||
{
|
||||
public DbSet<Faculty> Faculties { get; set; } = null!;
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.ApplyConfiguration(new FacultyConfiguration());
|
||||
base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user