public async Task <IHttpActionResult> CreateAsync(PartnerDto partner)
        {
            _partnerRepository.Add(partner.Map <Partner>());

            await UnitOfWork.CompleteAsync();

            return(Created(new Uri(Request.RequestUri + "/" + partner.Id), partner));
        }
        public async Task <IHttpActionResult> UpdateAsync(int id, PartnerDto partner)
        {
            var partnerInDb = await _partnerRepository.GetAsync(id);

            if (partnerInDb == null)
            {
                return(NotFound());
            }

            _partnerRepository.Add(partner.Map <Partner>());

            await UnitOfWork.CompleteAsync();

            return(Ok());
        }