Esempio n. 1
0
        public async Task <ActionResult <WithdrawalFormRespObj> > GetWithdrawalByIdAsync([FromQuery] SearchObj search)
        {
            if (search.SearchId < 1)
            {
                return(new WithdrawalFormRespObj
                {
                    Status = new APIResponseStatus {
                        IsSuccessful = false, Message = new APIResponseMessage {
                            FriendlyMessage = "ChangeOfRates Id is required"
                        }
                    }
                });
            }

            var response = await _repo.GetWithdrawalByIdAsync(search.SearchId);

            var resplist = new List <deposit_withdrawalform> {
                response
            };

            return(new WithdrawalFormRespObj
            {
                WithdrawalForms = _mapper.Map <List <WithdrawalFormObj> >(resplist),
            });
        }