Exemple #1
0
        private Expression<Func<Inventario, bool>> Action(Inventario bo)
        {
            Expression<Func<Inventario, bool>> exp = x => true;

            if (bo.ProductoId != null)
                exp = exp.And(x => x.ProductoId == bo.ProductoId);

            return exp;
        }
Exemple #2
0
 public List<Inventario> Retrieve(Inventario bo)
 {
     return repositorio.Get(Action(bo)).ToList();
 }
Exemple #3
0
 public void Insert(Inventario bo)
 {
     repositorio.Insert(bo);
     repositorio.SaveChange();
 }