コード例 #1
0
 private void ApplyMigrations()
 {
     using (TakeMyTimeDbContext context = new TakeMyTimeDbContext())
     {
         context.Database.Migrate();
     }
 }
コード例 #2
0
        public UnitOfWork(/*TakeMyTimeDbContext context*/)
        {
            this.context = new TakeMyTimeDbContext();

            Projects     = new ProjectRepository(context);
            Entries      = new EntryRepository(context);
            Assignments  = new AssignmentRepository(context);
            ProjectTypes = new ProjectTypeRepository(context);
            Subtasks     = new SubtaskRepository(context);
            Statistics   = new StatisticsRepository(context);
        }
コード例 #3
0
 public EntryRepository(TakeMyTimeDbContext context) : base(context)
 {
 }
コード例 #4
0
 public StatisticsRepository(TakeMyTimeDbContext context)
 {
     this.context = context;
 }
コード例 #5
0
 public ProjectTypeRepository(TakeMyTimeDbContext context) : base(context)
 {
     this.context = context;
 }
コード例 #6
0
 public AssignmentRepository(TakeMyTimeDbContext context) : base(context)
 {
     this.context = context;
 }
コード例 #7
0
 public SubtaskRepository(TakeMyTimeDbContext dbContext) : base(dbContext)
 {
     this.context = dbContext;
 }