public static void Initialize(ParishContext context) { context.Database.EnsureCreated(); if (context.AltarServants.Any()) { return; } var fixtures = new AltarServant[] { new AltarServant { FirstName = "Jacek", LastName = "Kupiec", Rank = AltarServantRank.Lector }, new AltarServant { FirstName = "Tomasz", LastName = "Plicht", Rank = AltarServantRank.MasterOfCeremony } }; context.AddRange(fixtures); context.SaveChanges(); }
public Repository(ParishContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
public DutiesRepository(ParishContext context) : base(context) { }
public ParishUnitOfWork(ParishContext context) { this.context = context; }
public AltarServantsRepository(ParishContext context) : base(context) { }