コード例 #1
0
        public EfRepository()
        {
            context = new SeminarManagerContext();
            context.Database.Migrate();

            person_repository   = new EfPersonRepository(context);
            seminar_repository  = new EfSeminarRepository(context);
            attendee_repository = new EfAttendeeRepository(context);

            if (person_repository.All().Count == 0)
            {
                person_repository.Save(new Person()
                {
                    Firstname = "Alexander",
                    Lastname  = "Stuckenholz",
                    EMail     = "*****@*****.**",
                    IsAdmin   = true,
                    Password  = "******"
                });
            }
        }
コード例 #2
0
 public EfSeminarRepository(SeminarManagerContext context)
 {
     this.context = context;
 }
コード例 #3
0
 public EfAttendeeRepository(SeminarManagerContext context)
 {
     this.context = context;
 }