public EfRepository(SuperheroeEntities dbContext)
        {
            if (dbContext == null)
            {
                throw new ArgumentNullException("Context cannot be null");
            }

            this.DbContext = dbContext;
            this.DbSet     = this.DbContext.Set <T>();
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            var context = new SuperheroeEntities();

            context.Database.CreateIfNotExists();
        }
Beispiel #3
0
 public UnitOfWork(SuperheroeEntities context)
 {
     this.dbContext = context;
 }