public void Update(Model.ComunicazioniMapping.ComAllegato entity) { int rows = 0; using (FAXPECContext dbcontext = new FAXPECContext()) { try { COMUNICAZIONI_ALLEGATI oldallegato = dbcontext.COMUNICAZIONI_ALLEGATI.Where(x => x.ID_ALLEGATO == entity.IdAllegato).FirstOrDefault(); oldallegato.ALLEGATO_EXT = entity.AllegatoExt; oldallegato.ALLEGATO_FILE = entity.AllegatoFile; rows = dbcontext.SaveChanges(); if (rows != 1) { throw new Exception("Nessun record aggiornato"); } } catch { throw; } } }
public void Insert(Model.ComunicazioniMapping.ComAllegato entity) { throw new NotImplementedException(); }