31 lines
1.0 KiB
C#
31 lines
1.0 KiB
C#
// <auto-generated> This file has been auto generated by EF Core Power Tools. </auto-generated>
|
|
using Lab3.Database.Context;
|
|
using Lab3.Database.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Lab3.Database.Context.Configurations
|
|
{
|
|
public partial class StudentSessionConfiguration : IEntityTypeConfiguration<StudentSession>
|
|
{
|
|
public void Configure(EntityTypeBuilder<StudentSession> entity)
|
|
{
|
|
entity.HasKey(e => e.Id).HasName("StudentSession_pkey");
|
|
|
|
entity.ToTable("StudentSession");
|
|
|
|
entity.Property(e => e.Id).ValueGeneratedNever();
|
|
|
|
entity.HasOne(d => d.Student).WithMany(p => p.StudentSessions)
|
|
.HasForeignKey(d => d.StudentId)
|
|
.HasConstraintName("StudentSession");
|
|
|
|
OnConfigurePartial(entity);
|
|
}
|
|
|
|
partial void OnConfigurePartial(EntityTypeBuilder<StudentSession> entity);
|
|
}
|
|
}
|