Beispiel #1
0
        public EfGenericRepository(TwitterLikeDbContext context)
        {
            if (context == null)
            {
                throw new ArgumentException("An instance of DbContext is required to use this repository.", "context");
            }

            this.Context = context;
            this.DbSet   = this.Context.Set <T>();
        }
 public GenericUnitOfWork()
 {
     ctx          = new TwitterLikeDbContext();
     repositories = new Dictionary <Type, object>();
 }
 public UserRepository(TwitterLikeDbContext twitterLikeDbContext)
 {
     _twitterLikeDbContext = twitterLikeDbContext;
 }