static void Main(string[] args)
        {
            var list = CreateStudents(10).ToList();
            Repository <Student> repo  = new StudentRepository();
            List <Student>       studs = repo.AsEnumerable().ToList();

            repo.AddRange(list);
            repo.Save();
        }
Exemple #2
0
        public async Task ProcessStudent(List <core.Student> students)
        {
            using (var context = new JonasTest.Data.Model.ScoreCardContext())
            {
                var repository = new StudentRepository(context);
                await repository.AddRange(students);

                await context.SaveChangesAsync();
            }
        }