Exemplo n.º 1
0
        public void AddStock(StockPost newStock)
        {
            Stock stock = new Stock();

            using (var db = new StockDBContext())
            {

                stock.FacebookID = newStock.FacebookID;
                stock.Symbol = newStock.Symbol;
                db.Stocks.Add(stock);
                db.SaveChanges();

            }
        }
Exemplo n.º 2
0
        public IHttpActionResult Post(StockPost newStock)
        {
            _adapter.AddStock(newStock);

            return Ok();
        }