private void ApplyMigrations()
 {
     using (TakeMyTimeDbContext context = new TakeMyTimeDbContext())
     {
         context.Database.Migrate();
     }
 }
Ejemplo n.º 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);
        }
 public EntryRepository(TakeMyTimeDbContext context) : base(context)
 {
 }
 public StatisticsRepository(TakeMyTimeDbContext context)
 {
     this.context = context;
 }
Ejemplo n.º 5
0
 public ProjectTypeRepository(TakeMyTimeDbContext context) : base(context)
 {
     this.context = context;
 }
Ejemplo n.º 6
0
 public AssignmentRepository(TakeMyTimeDbContext context) : base(context)
 {
     this.context = context;
 }
 public SubtaskRepository(TakeMyTimeDbContext dbContext) : base(dbContext)
 {
     this.context = dbContext;
 }