예제 #1
0
        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;
                }
            }
        }
예제 #2
0
 public void Insert(Model.ComunicazioniMapping.ComAllegato entity)
 {
     throw new NotImplementedException();
 }