public PmsResponseDto DeleteExpense(int ExpenseId) { if (ExpenseId <= 0) { throw new PmsException("Expense is not valid. Hence Expense can not be deleted."); } var response = new PmsResponseDto(); if (_iPmsLogic.DeleteExpense(ExpenseId)) { response.ResponseStatus = PmsApiStatus.Success.ToString(); response.StatusDescription = "Record deleted successfully."; } else { response.ResponseStatus = PmsApiStatus.Failure.ToString(); response.StatusDescription = "Operation failed.Please contact administrator."; } return(response); }