示例#1
0
 public Product GetById(Guid Id)
 {
     return(_lunaPetShopContext.products
            .AsQueryable()
            .Where(ProductQuery.GetById(Id))
            .FirstOrDefault());
 }
示例#2
0
        public Product GetProductById(int id)
        {
            ProductQuery pc = new ProductQuery(context);

            return(pc.GetById(id).FirstOrDefault());
        }