private GarmentAmendLetterOfCreditViewModel MapToViewModel(GarmentShippingAmendLetterOfCreditModel model)
        {
            GarmentAmendLetterOfCreditViewModel viewModel = new GarmentAmendLetterOfCreditViewModel
            {
                Active            = model.Active,
                Id                = model.Id,
                CreatedAgent      = model.CreatedAgent,
                CreatedBy         = model.CreatedBy,
                CreatedUtc        = model.CreatedUtc,
                DeletedAgent      = model.DeletedAgent,
                DeletedBy         = model.DeletedBy,
                DeletedUtc        = model.DeletedUtc,
                IsDeleted         = model.IsDeleted,
                LastModifiedAgent = model.LastModifiedAgent,
                LastModifiedBy    = model.LastModifiedBy,
                LastModifiedUtc   = model.LastModifiedUtc,


                amount           = model.Amount,
                description      = model.Description,
                amendNumber      = model.AmendNumber,
                date             = model.Date,
                documentCreditNo = model.DocumentCreditNo,
                letterOfCreditId = model.LetterOfCreditId
            };

            return(viewModel);
        }
        public async Task <int> Create(GarmentAmendLetterOfCreditViewModel viewModel)
        {
            GarmentShippingAmendLetterOfCreditModel model = new GarmentShippingAmendLetterOfCreditModel(viewModel.documentCreditNo, viewModel.letterOfCreditId, viewModel.amendNumber, viewModel.date, viewModel.description, viewModel.amount);

            return(await _repository.InsertAsync(model));
        }