public void RemoveDailyStockMarket(int id)
 {
     using (StockMarketDailyDataContext dataContext = new StockMarketDailyDataContext())
     {
         var stockMarketDaily = dataContext.stockMarketDailies.Where(stock => stock.Id == id).SingleOrDefault();
         dataContext.stockMarketDailies.DeleteOnSubmit(stockMarketDaily);
         dataContext.SubmitChanges();
     }
 }
 public void SaveStockMarketDaily(stockMarketDaily stockMarket)
 {
     if (stockMarket == null)
     {
         throw new ArgumentNullException("Stock Market was NULL");
     }
     using (StockMarketDailyDataContext dataContext = new StockMarketDailyDataContext())
     {
         stockMarket.CreatedDate = DateTime.Now;
         dataContext.stockMarketDailies.InsertOnSubmit(stockMarket);
         dataContext.SubmitChanges();
     }
 }