Exemple #1
0
 // method for saving results
 public void SaveResults(Stopwatch stopwatch)
 {
     using (var db = new ResultsContext())
     {
         //write
         var timeEntry = new Time {
             StartTime = DateTime.Now - stopwatch.Elapsed, EndTime = DateTime.Now, TotalTime = stopwatch.Elapsed
         };
         db.Add(timeEntry);
         db.SaveChanges();
     }
 }
 public Rezultate Add(Rezultate newRezultat)
 {
     _resultsContext.Add(newRezultat);
     return(newRezultat);
 }