Ejemplo n.º 1
0
        public void UpdateEducation(Educations education)
        {
            var edu = ctx.Educations.Where(x => x.Id == education.Id).FirstOrDefault();

            edu.EducationName = education.EducationName;
            ctx.Educations.Attach(edu);
            ctx.Entry(edu).State = EntityState.Modified;
            ctx.SaveChanges();
        }
Ejemplo n.º 2
0
        public Educations EducationByID(int id)
        {
            Educations course = ctx.Educations.Where(x => x.Id == id).FirstOrDefault();

            return(course);
        }
Ejemplo n.º 3
0
 public void RemoveEducation(Educations education)
 {
     ctx.Educations.Attach(education);
     ctx.Educations.Remove(education);
     ctx.SaveChanges();
 }
Ejemplo n.º 4
0
 public void InsertorUpdateEducation(Educations education)
 {
     ctx.Educations.Add(education);
     ctx.SaveChanges();
 }