public void Update(Observation observation) { var old = GetObservations().FirstOrDefault(it => it.Id == observation.Id); observation.AssignTo(old); UpdateDatabase(observation); }
private void UpdateDatabase(Observation observation) { Task.Run(() => { ExecuteInDatabase((item) => { observation.AssignTo(item); }, observation.Id); }); }