public IEnumerable <Coupon> GetAllCoupon() { _couponRepository = new CouponRepository(); Collection <Coupon> coupons = _couponRepository.GetAllCoupon(); return(coupons); }
public IActionResult GetCoupons(int userId) { try { return(Ok(couponRepository.GetAllCoupon(userId))); } catch (Exception e) { return(NotFound(e.Message)); } }
public async Task <List <CouponDetails> > GetAllCoupon(int userId) { try { return(await _iCoupounRepositoty.GetAllCoupon(userId)); } catch { throw; } }
/// <summary> /// Getting all coupons of a particular user /// </summary> /// <param name="userId"></param> /// <returns></returns> public async Task <List <CouponDetails> > GetAllCoupon(int userId) { log.Info("In CouponManagementHelper : GetAllCoupon(int userId)"); try { return(await _iCoupounRepositoty.GetAllCoupon(userId)); } catch (Exception e) { log.Error("Exception CouponManagementHelper: GetAllCoupon(int userId)" + e.Message); throw; } }
public List <Coupon> GetAllCoupon() { return(_iCouponRepository.GetAllCoupon()); }