public HttpResponseMessage Post(Donation donation)
        {
            if ((ModelState.IsValid) && (donation != null))
            {
                // check if known donor otherwise create new donor
                var donor = _donorRepository.GetDonor(donation.DonorID.Value);
                if (donor == null)
                {
                    donor = _donorRepository.CreateDonor(donation.Donor);
                }

                if (donation.Amount == 0)
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.ExpectationFailed, " Error Creating donation"));
                }

                donation.DonorID = donor.DonorID;
                donation.Donor   = null;
                var created = _donationRepository.CreateDonation(donation);
                if ((created != null) && (created.DonationID > 0))
                {
                    var response = Request.CreateResponse(HttpStatusCode.Created, donation);
                    response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = donation.DonationID }));
                    return(response);
                }
                else
                {
                    return(Request.CreateErrorResponse(HttpStatusCode.ExpectationFailed, " Error Creating donation"));
                }
            }
            return(Request.CreateResponse(HttpStatusCode.BadRequest));
        }