示例#1
0
 public List <Moneda> GetAll()
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.Monedas.ToList());
     }
 }
 public List <PalabraClave> GetAll()
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.PalabrasClave.ToList());
     }
 }
 public Presupuesto Get(int id)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.Presupuestos.Include("PresupuestosCategorias.Cat").FirstOrDefault(u => u.Id == id));
     }
 }
 public List <Presupuesto> GetAll()
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.Presupuestos.Include("PresupuestosCategorias.Cat").ToList());
     }
 }
 public List <Categoria> GetAll()
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.Categorias.Include("ListaPalabras").ToList());
     }
 }
示例#6
0
 public Moneda Get(int id)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.Monedas.FirstOrDefault(u => u.Id == id));
     }
 }
 MontoCategoria IDataAccess <MontoCategoria> .Get(int id)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.PresupuestosCategorias.Include("Cat").FirstOrDefault(u => u.Id == id));
     }
 }
示例#8
0
 public List <Gasto> GetAll()
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.Gastos.Include("Categoria").Include("Moneda").ToList());
     }
 }
 List <MontoCategoria> IDataAccess <MontoCategoria> .GetAll()
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.PresupuestosCategorias.Include("Cat").ToList());
     }
 }
 public Categoria Get(int id)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         return(Contexto.Categorias.Include("ListaPalabras").FirstOrDefault(u => u.Id == id));
     }
 }
 public bool Contains(Presupuesto entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         List <Presupuesto> Lista = Contexto.Presupuestos.Where(x => x.Equals(entidad)).ToList();
         return(Lista.Count() != 0);
     }
 }
 public void Remove(Presupuesto entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Contexto.Presupuestos.Remove(entidad);
         Contexto.SaveChanges();
     }
 }
示例#13
0
 public bool Contains(Gasto entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Gasto unGasto = Contexto.Gastos.FirstOrDefault(u => u.Id == entidad.Id);
         return(unGasto != null);
     }
 }
示例#14
0
 public Gasto Get(int id)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Gasto unGasto = Contexto.Gastos.Include("Categoria").Include("Moneda").FirstOrDefault(u => u.Id == id);
         return(unGasto);
     }
 }
 public void Add(Categoria entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Contexto.Categorias.Add(entidad);
         Contexto.SaveChanges();
     }
 }
 public bool Contains(Categoria entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         List <Categoria> Lista = Contexto.Categorias.Where(x => x.Equals(entidad)).ToList();
         return(Lista.Count() != 0);
     }
 }
示例#17
0
 public void Add(Moneda entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Contexto.Monedas.Add(entidad);
         Contexto.SaveChanges();
     }
 }
示例#18
0
 public bool Contains(Moneda entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Moneda unaMoneda = Contexto.Monedas.FirstOrDefault(u => u.Id == entidad.Id);
         return(unaMoneda != null);
     }
 }
 public void Add(PalabraClave entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Contexto.PalabrasClave.Add(entidad);
         Contexto.SaveChanges();
     }
 }
 public bool Contains(PalabraClave entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         PalabraClave unaPalabraClave = Contexto.PalabrasClave.FirstOrDefault(u => u.Id == entidad.Id);
         return(unaPalabraClave != null);
     }
 }
 public PalabraClave Get(int id)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         PalabraClave unaPalabraClave = Contexto.PalabrasClave.FirstOrDefault(u => u.Id == id);
         return(unaPalabraClave);
     }
 }
 public bool Contains(MontoCategoria entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         MontoCategoria unMonto = Contexto.PresupuestosCategorias.FirstOrDefault(u => u.Id == entidad.Id);
         return(unMonto != null);
     }
 }
 public void Remove(MontoCategoria entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Contexto.PresupuestosCategorias.Remove(entidad);
         Contexto.SaveChanges();
     }
 }
示例#24
0
 public void Remove(Moneda entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Moneda unaMoneda = Contexto.Monedas.FirstOrDefault(u => u.Id == entidad.Id);
         Contexto.Monedas.Remove(unaMoneda);
         Contexto.SaveChanges();
     }
 }
 public void Remove(PalabraClave entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         PalabraClave unaPalabraClave = Contexto.PalabrasClave.FirstOrDefault(u => u.Id == entidad.Id);
         Contexto.PalabrasClave.Remove(unaPalabraClave);
         Contexto.SaveChanges();
     }
 }
 public void Add(MontoCategoria entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Contexto.PresupuestosCategorias.Add(entidad);
         Contexto.Entry(entidad.Cat).State = EntityState.Unchanged;
         Contexto.SaveChanges();
     }
 }
 public void Update(PalabraClave entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         PalabraClave unaPalabraClave = Contexto.PalabrasClave.FirstOrDefault(u => u.Id == entidad.Id);
         unaPalabraClave.Palabra = entidad.Palabra;
         Contexto.Entry(unaPalabraClave).State = EntityState.Modified;
         Contexto.SaveChanges();
     }
 }
示例#28
0
 public void Add(Gasto entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Contexto.Entry(entidad.Categoria).State = EntityState.Unchanged;
         Contexto.Entry(entidad.Moneda).State    = EntityState.Unchanged;
         Contexto.Gastos.Add(entidad);
         Contexto.SaveChanges();
     }
 }
示例#29
0
 public void Remove(Gasto entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         Gasto unGasto = Contexto.Gastos.Include("Categoria").Include("Moneda").FirstOrDefault(u => u.Id == entidad.Id);
         Contexto.Entry(unGasto.Categoria).State = EntityState.Unchanged;
         Contexto.Entry(unGasto.Moneda).State    = EntityState.Unchanged;
         Contexto.Gastos.Remove(unGasto);
         Contexto.SaveChanges();
     }
 }
 public void Update(MontoCategoria entidad)
 {
     using (var Contexto = new ContextoFinanzas())
     {
         MontoCategoria unMonto = Contexto.PresupuestosCategorias.FirstOrDefault(u => u.Id == entidad.Id);
         unMonto.Monto = entidad.Monto;
         unMonto.Cat   = entidad.Cat;
         Contexto.Entry(unMonto).State = EntityState.Modified;
         Contexto.SaveChanges();
     }
 }