Beispiel #1
0
        public UnitOfWork(DbContextSPATestTask contextOptions)
        {
            this.contextOptions = contextOptions ?? throw new ArgumentNullException(nameof(contextOptions));

            User = new UserRepository(contextOptions);
            Task = new TaskRepository(contextOptions);
        }
Beispiel #2
0
 public TaskRepository(DbContextSPATestTask contextSpaTestTask) : base(contextSpaTestTask)
 {
     dbSet = contextSpaTestTask.Tasks;
 }
Beispiel #3
0
 public UserRepository(DbContextSPATestTask contextSpaTestTask) : base(contextSpaTestTask)
 {
     dbSet = contextSpaTestTask.Users;
 }
Beispiel #4
0
 public Repository(DbContextSPATestTask contextSpaTestTask)
 {
     this.contextSpaTestTask = contextSpaTestTask;
     dbSet = contextSpaTestTask.Set <T>();
 }