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