public async Task SaveChangesAsync() { var tasks = new List <Task>() { Task.Run(() => Lessons.Save()), Task.Run(() => Students.Save()), Task.Run(() => Subjects.Save()), }; await Task.WhenAll(tasks); }
public void SaveChanges() { Lessons.Save(); Students.Save(); Subjects.Save(); }