public GenderRepository(EventRegistrationDbContext context) { _context = context; if ((this.GetAll()?.Count() <= 0)) { _context.Gender.AddRange(new List <Gender> { new Gender { Label = "Male", Value = "M" }, new Gender { Label = "Female", Value = "F" } }); _context.SaveChanges(); } }
public DayRepository(EventRegistrationDbContext context) { _context = context; if ((this.GetAll()?.Count() <= 0)) { _context.Day.AddRange(new List <Day> { new Day { Label = "Day 1" }, new Day { Label = "Day 2" }, new Day { Label = "Day 3" } }); _context.SaveChanges(); } }
public RegistrationRepository(EventRegistrationDbContext context) { _context = context; }