public Subscription RegistrerResponse(ResponseModel responseModel) { if (responseModel == null) { throw new ArgumentNullException("responseModel"); } Response response = responseModel.Map <ResponseModel, Response>(); Subscription responseSubscrition = this.GetResponseSubscription(response); if (responseSubscrition != null) { response.SubscritionFound = true; response.SubscriptionId = responseSubscrition.Id; responseSubscrition.DateNextPayment = response.DateNextPayment; responseSubscrition.Approved = response.ResponseCode == 1; base.Update(responseSubscrition); } this.responseService.Insert(response); return(responseSubscrition); }