public void Update(UpdateReferral model, string userId)
        {
            DataProvider.ExecuteNonQuery(GetConnection, "dbo.PartnerReferral_Update",
                inputParamMapper: delegate(SqlParameterCollection paramCollection)
            {
                paramCollection.AddWithValue("@Id", model.Id);
                paramCollection.AddWithValue("@UserId", userId);
                paramCollection.AddWithValue("@PartnerType", model.PartnerType);
                paramCollection.AddWithValue("@PartnerName", model.PartnerName);
                paramCollection.AddWithValue("@Description", model.Description);
                paramCollection.AddWithValue("@URL", model.URL.ToString());
                paramCollection.AddWithValue("@AffiliateCode", model.AffiliateCode);

            }
            , returnParameters: delegate(SqlParameterCollection param)
            {

            }
            );
        }
        public HttpResponseMessage ReferralUpdate(UpdateReferral model)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            string userId = _userService.GetCurrentUserId();

            SuccessResponse response = new SuccessResponse();

            _referralService.Update(model, userId);

            return Request.CreateResponse(response);
        }