MireaBackend/SqlData/Persistence/UberDbContext.cs

26 lines
1.1 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using Mirea.Api.DataAccess.Domain.Schedule;
using Mirea.Api.DataAccess.Persistence.Common;
using System.Reflection;
namespace Mirea.Api.DataAccess.Persistence;
public class UberDbContext(DbContextOptions<UberDbContext> options) : BaseDbContext<UberDbContext>(options)
{
2024-01-26 07:43:27 +03:00
public DbSet<Campus> Campuses { get; set; } = null!;
public DbSet<Discipline> Disciplines { get; set; } = null!;
public DbSet<Faculty> Faculties { get; set; } = null!;
public DbSet<Group> Groups { get; set; } = null!;
public DbSet<LectureHall> LectureHalls { get; set; } = null!;
2024-01-26 07:43:27 +03:00
public DbSet<LessonAssociation> LessonAssociations { get; set; } = null!;
public DbSet<Lesson> Lessons { get; set; } = null!;
public DbSet<Professor> Professors { get; set; } = null!;
public DbSet<TypeOfOccupation> TypeOfOccupations { get; set; } = null!;
2024-05-19 11:52:56 +03:00
public DbSet<SpecificWeek> SpecificWeeks { get; set; } = null!;
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.ApplyConfigurationsFromAssembly(Assembly.GetExecutingAssembly());
base.OnModelCreating(modelBuilder);
}
}