using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StudentModels;

namespace StudentDAL.EntityConfigurations
{
    public class StudentInSubjectConfiguration : EntityTypeConfiguration<StudentInSubject>
    {
        public StudentInSubjectConfiguration()
        {
            HasOptional(a => a.Grade).WithMany(b => b.StudentInSubjects).WillCascadeOnDelete(false);
            HasRequired(a => a.Subject).WithMany(b => b.StudentInSubjects).WillCascadeOnDelete(false);
            HasRequired(a => a.Student).WithMany(b => b.StudentInSubjects).WillCascadeOnDelete(false);
        }
    }
}
