public static ProductReview Load(Int32 productReviewId, bool useCache) { if (productReviewId == 0) { return(null); } ProductReview productReview = null; string key = "ProductReview_" + productReviewId.ToString(); if (useCache) { productReview = ContextCache.GetObject(key) as ProductReview; if (productReview != null) { return(productReview); } } productReview = new ProductReview(); if (productReview.Load(productReviewId)) { if (useCache) { ContextCache.SetObject(key, productReview); } return(productReview); } return(null); }
public static bool Delete(Int32 productReviewId) { ProductReview productReview = new ProductReview(); if (productReview.Load(productReviewId)) { return(productReview.Delete()); } return(false); }