Пример #1
0
 //public static PRICE price;
 public static PRODUCTS_DTO getProductsById(int id)
 {
     using (HMO_PROGECTEntities ctx = new HMO_PROGECTEntities())
     {
         return(ProductsCRUD.ReadById(ctx, id));
     }
 }
Пример #2
0
 public static PRICE GetProductPrice(PRODUCTS_TBL product)
 {
     using (HMO_PROGECTEntities ctx = new HMO_PROGECTEntities())
     {
         var productdetail = ProductsCRUD.ReadById(ctx, product.productId);
         if (productdetail != null)
         {
             PRICE price = ctx.PRICEs.Where(u => u.productId == product.productId).FirstOrDefault();
             return(price);
         }
         return(null);
     }
 }