public async Task<IHttpActionResult> PostApplication(Application entity)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            _unitOfWork.ApplicationRepository.Insert(entity);

            try
            {
                await _unitOfWork.SaveChangesAsync();
            }
            catch (UpdateException)
            {
                if (_unitOfWork.ApplicationRepository.Find(entity.ApplicationId) == null)
                {
                    return Conflict();
                }
                throw;
            }

            await _unitOfWork.ApplicationRepository.LoadRelatedEntitiesAsync(entity);
            entity.AcceptChanges();

            return CreatedAtRoute("DefaultApi", new { id = entity.ApplicationId }, entity);
        }
        public async Task<IHttpActionResult> PutApplication(Application entity)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            _unitOfWork.ApplicationRepository.Update(entity);

            try
            {
                await _unitOfWork.SaveChangesAsync();
            }
            catch (UpdateConcurrencyException)
            {
                if (_unitOfWork.ApplicationRepository.Find(entity.ApplicationId) == null)
                {
                    return Conflict();
                }
                throw;
            }

            await _unitOfWork.ApplicationRepository.LoadRelatedEntitiesAsync(entity);
            entity.AcceptChanges();
            return Ok(entity);
        }