public IActionResult CreateSaleTransaction([FromBody] TrxTransaction trxTransaction) { if (ModelState.IsValid) { var result = _repository.CreateSaleTransaction(trxTransaction); return(result); } else { return(new HttpStatusCodeResult((int)HttpStatusCode.BadRequest)); } }
public IActionResult CreateSaleTransaction(TrxTransaction trxTransaction) { try { _dbContext.TrxTransaction.Add(trxTransaction); _dbContext.SaveChanges(); return(new HttpStatusCodeResult((int)HttpStatusCode.Created)); } catch (Exception exp) { throw exp; } }
public string CreateSaleTransaction(TrxTransaction trxTransaction) { try { _dbContext.TrxTransaction.Add(trxTransaction); _dbContext.SaveChanges(); return(HttpStatusCode.Created.ToString()); } catch (Exception exp) { throw exp; } }
public string CreateSaleTransaction(TrxTransaction trxTransaction) { throw new NotImplementedException(); }