Esempio n. 1
0
        public async Task <IActionResult> DeleteBankClosure([FromBody] DeleteFeeCommand command)
        {
            var response = false;
            var Ids      = command.FeeIds;

            foreach (var id in Ids)
            {
                response = await _repo.DeleteFeeAsync(id);
            }
            if (!response)
            {
                return(BadRequest(
                           new DeleteRespObj
                {
                    Deleted = false,
                    Status = new APIResponseStatus {
                        IsSuccessful = false, Message = new APIResponseMessage {
                            FriendlyMessage = "Unsuccessful"
                        }
                    }
                }));
            }
            return(Ok(
                       new DeleteRespObj
            {
                Deleted = true,
                Status = new APIResponseStatus {
                    IsSuccessful = true, Message = new APIResponseMessage {
                        FriendlyMessage = "Successful"
                    }
                }
            }));
        }