예제 #1
0
        public ResponseDeleteTransaction DeleteTransaction(RequestDeleteTransaction request)
        {
            ResponseDeleteTransaction response = new ResponseDeleteTransaction();

            if (request.Transaction == null)
            {
                throw new ArgumentNullException("Bad Request");
            }
            else if (request.Transaction.ID == 0)
            {
                throw new ArgumentException("Arguments not valid");
            }

            _business.DeleteTransaction(request.Transaction);

            return(response);
        }
예제 #2
0
 public ResponseDeleteTransaction Delete([FromBody] RequestDeleteTransaction request)
 {
     return(Task.Run(async() => await Service.DeleteTransaction(request)).Result);
 }
 public Task <ResponseDeleteTransaction> DeleteTransaction(RequestDeleteTransaction request)
 {
     return(Task.Run(() => {
         return _service.DeleteTransaction(request);
     }));
 }