public async Task InsertADMasterCurrency(ADMasterCurrency objADMasterCurrency)
        {
            try
            {
                _Context.ADMasterCurrencies.Add(objADMasterCurrency);

                await _Context.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        public async Task UpdateADMasterCurrency(ADMasterCurrency objADMasterCurrency)
        {
            try
            {
                _Context.Entry(objADMasterCurrency).State = Microsoft.EntityFrameworkCore.EntityState.Modified;

                await _Context.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        public async Task DeleteADMasterCurrency(long MasterCurrencyId)
        {
            try
            {
                ADMasterCurrency objADMasterCurrency = _Context.ADMasterCurrencies.Find(MasterCurrencyId);
                _Context.ADMasterCurrencies.Remove(objADMasterCurrency);

                await _Context.SaveChangesAsync();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        public async Task <ActionResult <MasterCurrencyResult> > PostADMasterCurrency(ADMasterCurrency objADMasterCurrency)
        {
            try
            {
                await _IMasterCurrencyInterface.InsertADMasterCurrency(objADMasterCurrency);

                return(CreatedAtAction("GetADMasterCurrency", new { id = objADMasterCurrency.MasterCurrencyId }, objADMasterCurrency));
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }
        public async Task <ActionResult <MasterCurrencyResult> > PutADMasterCurrency(long id, ADMasterCurrency objADMasterCurrency)
        {
            if (id != objADMasterCurrency.MasterCurrencyId)
            {
                return(BadRequest());
            }


            try
            {
                await _IMasterCurrencyInterface.UpdateADMasterCurrency(objADMasterCurrency);

                return(_IMasterCurrencyInterface.GetADMasterCurrencyByID(id));
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!_IMasterCurrencyInterface.ADMasterCurrencyExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }

            return(NoContent());
        }