Пример #1
0
 public void Add(Programador programador)
 {
     using (EasyProjectEntities db = new EasyProjectEntities())
     {
         db.Programadors.Add(programador);
         db.SaveChanges();
     }
 }
Пример #2
0
 public void Remove(long idProgramador)
 {
     using (EasyProjectEntities db = new EasyProjectEntities())
     {
         var prog = db.Programadors.Include(b => b.Conhecimento).FirstOrDefault(b => b.IDProgramador == idProgramador);
         db.Programadors.Remove(prog);
         db.SaveChanges();
     }
 }
Пример #3
0
 public void Update(Programador updateProgramador)
 {
     using (EasyProjectEntities db = new EasyProjectEntities())
     {
         db.Entry(updateProgramador).State = EntityState.Modified;
         db.Entry(updateProgramador.Conhecimento).State = EntityState.Modified;
         db.SaveChanges();
     }
 }
 public ConhecimentoRepository(EasyProjectEntities context)
 {
     this.context = context;
 }