public static void InsertarProducto(productos P) { Repo = new ProductosRepository(); Repo.Insert(P); Repo.SubmitChanges(); }
public static void EliminarProducto(productos P) { Repo = new ProductosRepository(); Repo.Delete(P); Repo.SubmitChanges(); }
public static IQueryable <productos> ObtenerProductoPorCategoria(string categoria) { Repo = new ProductosRepository(); return(from p in Repo.GetTable() where p.Categoria == categoria select p); }
public static Double ObtenerPrecioPorCategoria(string categoria) { Repo = new ProductosRepository(); var producto = new productos(); producto = (from p in Repo.GetTable() where p.Categoria == categoria select p).FirstOrDefault(); return(producto.Precio); }