/// <summary> /// Method for adding Stock entity to database /// </summary> /// <param name="stock">Stock entity to add</param> public void Add(Stock stock) { var watch = Stopwatch.StartNew(); _context.Add(stock); _context.SaveChanges(); LastOperationTime = (int)watch.ElapsedMilliseconds; }
/// <summary> /// Method for adding SellOffer entity to database /// </summary> /// <param name="sellOffer">SellOffer entity to add</param> public void Add(SellOffer sellOffer) { _context.Add(sellOffer); var watch = Stopwatch.StartNew(); _context.SaveChanges(); LastOperationTime = (int)watch.ElapsedMilliseconds; }
/// <summary> /// Metohod for adding transaction entity to daatabase /// </summary> /// <param name="transaction">Transaction entity to add</param> public void Add(Transaction transaction) { _context.Add(transaction); var watch = Stopwatch.StartNew(); _context.SaveChanges(); LastOperationTime = (int)watch.ElapsedMilliseconds; }