示例#1
0
        public taxa SeleccionarTaxaPorIDTaxa(long IdTaxa)
        {
            var consulta = from lstTaxa in contexto.taxas
                           where lstTaxa.IdTaxa == IdTaxa
                           select lstTaxa;
            taxa txaTaxa = consulta.SingleOrDefault();

            return(txaTaxa);
        }
示例#2
0
        public taxa SeleccionarTaxaPorId(int idTaxa)
        {
            var consultaId = from txaTaxa in contexto.taxas
                             where txaTaxa.IdTaxa == idTaxa
                             join espeEspecie in contexto.especies on txaTaxa.IdTaxa equals espeEspecie.IdTaxa
                             join ampAmphibia in contexto.amphibias on espeEspecie.IdEspecie equals ampAmphibia.IdEspecie
                             select txaTaxa;
            taxa txaTaxaRes = consultaId.SingleOrDefault();

            return(txaTaxaRes);
        }
示例#3
0
        public bool eliminarTaxa(long idtaxa)
        {
            taxa tataxa = contexto.taxas.Where(t => t.IdTaxa == idtaxa).SingleOrDefault();

            if (tataxa != null)
            {
                contexto.taxas.Remove(tataxa);
                contexto.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#4
0
        public bool actualizarTaxa(taxa taxaModificada)
        {
            taxa txaTaxa = contexto.taxas.Where(t => t.IdTaxa == taxaModificada.IdTaxa).SingleOrDefault();

            if (txaTaxa != null)
            {
                txaTaxa.Nombre      = taxaModificada.Nombre;
                txaTaxa.NombreCorto = taxaModificada.NombreCorto;
                txaTaxa.EnEcuador   = taxaModificada.EnEcuador;
                contexto.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#5
0
        public bool actualizarTaxa(taxa TaxaModificada)
        {
            taxa tataxa = contexto.taxas.Where(t => t.IdTaxa == TaxaModificada.IdTaxa).SingleOrDefault();

            if (tataxa != null)
            {
                tataxa.IdTaxa       = TaxaModificada.IdTaxa;
                tataxa.Nombre       = TaxaModificada.Nombre;
                tataxa.nombrecomuns = TaxaModificada.nombrecomuns;
                tataxa.NombreCorto  = TaxaModificada.NombreCorto;
                //etc etc
                contexto.SaveChanges();
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#6
0
 public Int64 insertarTaxa(taxa nuevaTaxa)
 {
     contexto.taxas.Add(nuevaTaxa);
     contexto.SaveChanges();
     return(nuevaTaxa.IdTaxa);
 }
示例#7
0
 public bool eliminarTaxa(taxa taxaEliminado)
 {
     return(logica.eliminarTaxa(taxaEliminado.IdTaxa));
 }
示例#8
0
 public bool actualizarTaxa(taxa taxaModificada)
 {
     return(logica.actualizarTaxa(taxaModificada));
 }
示例#9
0
 public Int64 insertarTaxa(taxa nuevaTaxa)
 {
     return(logica.insertarTaxa(nuevaTaxa));
 }
示例#10
0
 public bool actualizarTaxa(taxa taxaModificada)
 {
     return(datos.actualizarTaxa(taxaModificada));
 }
示例#11
0
 public Int64 insertarTaxa(taxa nuevaTaxa)
 {
     return(datos.insertarTaxa(nuevaTaxa));
 }
示例#12
0
 public bool eliminarTaxa(taxa taxaEliminada)
 {
     return(logic.eliminarTaxa(taxaEliminada.IdTaxa));
 }
示例#13
0
 public bool actualizarTaxa(taxa taxaActualizada)
 {
     return(logic.actualizarTaxa(taxaActualizada));
 }
示例#14
0
 public Int64 InsertarTaxa(taxa nuevaTaxa)
 {
     return(logic.InsertarTaxa(nuevaTaxa));
 }
示例#15
0
 public bool actualizarTaxa(taxa taxaActualizada)
 {
     return(datos.actualizarTaxa(taxaActualizada));
 }