Esempio 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();

            }
        }
        public IHttpActionResult Post(StockPost newStock)
        {
            _adapter.AddStock(newStock);

            return Ok();
        }