예제 #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();

            }
        }
예제 #2
0
        public IHttpActionResult Post(StockPost newStock)
        {
            _adapter.AddStock(newStock);

            return Ok();
        }