public CouponViewModel AddCoupon(string value) { var converted = Convert.ToInt32(value); var userId = HttpContext.Current.User.Identity.GetUserId(); return(TransformModels.ToCouponViewModel(_wheelService.CreateCoupon(converted, userId))); }
public IEnumerable <CouponViewModel> GetByUserId(string userId) { return(_wheelService.GetCouponByUserId(userId).Select(x => TransformModels.ToCouponViewModel(x))); }
public IEnumerable <CouponViewModel> GetAll() { return(_wheelService.GetAllCoupons().Select(x => TransformModels.ToCouponViewModel(x))); }