Пример #1
0
 public IHttpActionResult Sell(TransactionDTO transaction) {
     if (ModelState.IsValid && _stockService.CheckExists(transaction.Ticker)) {
         return Ok(_stockService.Sell(transaction.Ticker, transaction.Quantity, User.Identity.Name));
     }
     return BadRequest();
 }
Пример #2
0
 public IHttpActionResult Trade(TransactionDTO transaction, string type) {
     if(ModelState.IsValid && _stockService.CheckExists(transaction.Ticker)) {
         return Ok();
     }
     return BadRequest();
 }