static public void addPDCA(PDCA PDCA) { using (PDCARepository PDCArepo = new PDCARepository()) { PDCArepo.context.Entry(PDCA.resultat).State = EntityState.Unchanged; PDCArepo.Add(PDCA); PDCArepo.Save(); } }
public void Update(PDCA entity) { context.Entry(entity).State = EntityState.Modified; //PDCA PDCA = (from c in context.PDCAs where c.PDCAID == entity.PDCAID select c).Single<PDCA>(); //PDCA.Coef= entity.Coef; //PDCA.NomPDCA = entity.NomPDCA; //PDCA.NumPDCA = entity.NumPDCA; //PDCA.PDCAID = PDCA.PDCAID; }
static public PDCA GetPDCA(int PDCAid) { PDCA PDCAtemp = null; using (PDCARepository PDCArepo = new PDCARepository()) { PDCAtemp = PDCArepo.GetSingle(PDCAid); } return(PDCAtemp); }
public void Delete(PDCA entity) { context.Pdcas.Remove(entity); }
//public PDCA GetSingleByName(string nomPdca) //{ // var query = (from c in context.Pdcas select c).FirstOrDefault<PDCA>(x => (x.NomPDCA == nomPdca)); // return query; //} public void Add(PDCA entity) { context.Entry(entity.resultat).State = EntityState.Unchanged; context.Pdcas.Add(entity); }