コード例 #1
0
        override public bool Equals(object obj)
        {
            Enrolement other = obj as Enrolement;

            if (other == null)
            {
                return(false);
            }
            return(other.ClassId == this.ClassId && other.UserId == this.UserId);
        }
 public void DeleteEnrolement(Enrolement enrolement)
 {
     this.Enrolement.Remove(enrolement);
     this.SaveChanges();
 }
 public void UpdateEnrolement(Enrolement enrolement)
 {
     this.Entry(enrolement).State = EntityState.Modified;
     this.SaveChanges();
 }
 public void CreateEnrolement(Enrolement enrolement)
 {
     this.Enrolement.Add(enrolement);
     this.SaveChanges();
 }