static int ScriptUpdate1() { Number model = NumberService.Read(new Number() { Size = 2, TypeOfNumber = "Standart" }, 1, 0).First(); DateTime startTime = DateTime.Now; NumberService.Update(model); DateTime finishTime = DateTime.Now; return((int)(finishTime - startTime).TotalMilliseconds); }
static int ScriptRead2() { Number model = NumberService.Read(new Number() { Size = 2, TypeOfNumber = "Standart" }, 1, 0).First(); DateTime startTime = DateTime.Now; Number models = NumberService.Read(model, 1, 0).First(); DateTime finishTime = DateTime.Now; Console.WriteLine("{0}: {1} - {2}", models.Id, models.Size, models.TypeOfNumber); return((int)(finishTime - startTime).TotalMilliseconds); }
private void Read(object obj) { Numbers = _numberService.Read().ToObservableCollection(); }