Пример #1
0
 public bool InsertarMessages_filesDTO(Dtos.messages_filesDTO dto)
 {
     try
     {
         using (var modelo = new PersistenciaDatos.SignalDBEntities())
         {
             var entity = dto.ToEntity();
             modelo.messages_files.Add(entity);
             modelo.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         throw new NotImplementedException();
     }
 }
Пример #2
0
 public bool ActualizarMessages_filesDTO(Dtos.messages_filesDTO dto)
 {
     try
     {
         using (var modelo = new PersistenciaDatos.SignalDBEntities())
         {
             var w = modelo.messages_files.Where(q => q.id_messages_files == dto.id_messages_files).Select(q => q).FirstOrDefault();
             if (w == null)
             {
                 return(false);
             }
             Dominio.Convertidores.messages_filesCONVERTIDOR.Actualizar(dto, w);
             modelo.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         throw new NotImplementedException();
     }
 }