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();
        }
Ejemplo n.º 2
0
 public Repository(ParishContext context)
 {
     this.context = context;
     this.dbSet   = context.Set <TEntity>();
 }
Ejemplo n.º 3
0
 public DutiesRepository(ParishContext context)
     : base(context)
 {
 }
Ejemplo n.º 4
0
 public ParishUnitOfWork(ParishContext context)
 {
     this.context = context;
 }
Ejemplo n.º 5
0
 public AltarServantsRepository(ParishContext context)
     : base(context)
 {
 }