예제 #1
0
 IEnumerable <ProductOptionModel> IProductOptionService.GetOptionsByProductID(Guid productID)
 {
     using (var work = GetUnitOfWork())
     {
         var optionEntities = work.ProductOptions.Find(opt => opt.ProductId == productID);
         return(_mapper.MapFromEntityRangeToModels(optionEntities));
     }
 }
예제 #2
0
 IEnumerable <ProductModel> IProductService.GetAllProduct()
 {
     using (var work = GetUnitOfWork())
     {
         var productEntities = work.Products.GetAll();
         return(_mapper.MapFromEntityRangeToModels(productEntities));
     }
 }