Use the configuration depending on the selected database provider #13
@ -2,13 +2,13 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class CampusConfiguration : IEntityTypeConfiguration<Campus>
|
||||
public sealed class CampusConfiguration : IEntityTypeConfiguration<Campus>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<Campus> builder)
|
||||
{
|
||||
builder.ToTable(nameof(Campus));
|
||||
builder.ToTable("MyCampusName");
|
||||
builder.HasKey(c => c.Id);
|
||||
builder.HasIndex(c => c.Id).IsUnique();
|
||||
builder.Property(c => c.Id).HasColumnType("INTEGER").IsRequired().ValueGeneratedOnAdd();
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class DisciplineConfiguration : IEntityTypeConfiguration<Discipline>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class FacultyConfiguration : IEntityTypeConfiguration<Faculty>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class GroupConfiguration : IEntityTypeConfiguration<Group>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class LectureHallConfiguration : IEntityTypeConfiguration<LectureHall>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class LessonAssociationConfiguration : IEntityTypeConfiguration<LessonAssociation>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class LessonConfiguration : IEntityTypeConfiguration<Lesson>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class ProfessorConfiguration : IEntityTypeConfiguration<Professor>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class SpecificWeekConfiguration : IEntityTypeConfiguration<SpecificWeek>
|
||||
{
|
@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using Mirea.Api.DataAccess.Domain.Schedule;
|
||||
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Schedule;
|
||||
namespace Mirea.Api.DataAccess.Persistence.EntityTypeConfigurations.Sqlite.Schedule;
|
||||
|
||||
public class TypeOfOccupationConfiguration : IEntityTypeConfiguration<TypeOfOccupation>
|
||||
{
|
Loading…
Reference in New Issue
Block a user