Part 4 - TransactionController
public class Transaction | |
{ | |
public PaymentType PaymentType { get; set; } | |
public decimal Amount { get; set; } | |
} |
[ApiController] | |
[Route("[controller]")] | |
public class TransactionController : ControllerBase | |
{ | |
private static readonly List<Transaction> s_Transactions = new List<Transaction>(); | |
[HttpPost] | |
[Route("create")] | |
public IActionResult CreateTransaction(Transaction transaction) | |
{ | |
s_Transactions.Add(transaction); | |
return Ok(); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment