public ViewResult AddClaimFile(Guid id)
        {
            InsuranceClaimsAddClaimFileViewModel model = new InsuranceClaimsAddClaimFileViewModel
            {
                Id = id
            };

            return(View(model));
        }
        public IActionResult AddClaimFile(InsuranceClaimsAddClaimFileViewModel model)
        {
            InsuranceClaim insuranceClaim = _insuranceClaimsRepository.GetClaim(model.Id);

            if (ModelState.IsValid)
            {
                FileHandler     fileHandler     = new FileHandler();
                FileDescription fileDescription = fileHandler.UploadSingleFile(model.File, model.FileType, insuranceClaim.ClaimNo, DateTime.Now, model.Descrption);
                _fileDescriptionsRepository.Create(fileDescription);
                InsuranceClaimFile claimFile = new InsuranceClaimFile
                {
                    FileDescriptionId = fileDescription.Id,
                    InsuranceClaimId  = insuranceClaim.Id
                };
                _insuranceClaimFilesRepository.Add(claimFile);
                insuranceClaim.InsuranceClaimFiles.Add(claimFile);
                _insuranceClaimsRepository.Update(insuranceClaim);
                return(RedirectToAction("details", new { id = model.Id }));
            }
            return(RedirectToAction("AddClaimFile", new { id = model.Id }));
        }