public ProjectParticipationHistoryRepository(PMContext context) : base(context)
 {
 }
Ejemplo n.º 2
0
 public PropertiesController(PMContext context)
 {
     _context = context;
 }
 public StoreServices(IMapper Mapper, PMContext Context)
 {
     mapper  = Mapper;
     context = Context;
 }
Ejemplo n.º 4
0
 public PersonsRepository(PMContext context) : base(context)
 {
 }
Ejemplo n.º 5
0
 public ApiSamplesController(PMContext context, ISampleRepository sampleRepository, IEmployeeRepository employeeRepository)
 {
     _context            = context;
     _sampleRepository   = sampleRepository;
     _employeeRepository = employeeRepository;
 }
        //private readonly DbSet<ProjectParticipationHistory> _dbSetParticipationHistories;

        public ProjectRepository(PMContext context) : base(context)
        {
        }
Ejemplo n.º 7
0
 public LoginController(PMContext <User> context, IBaseRepository <User> repository)
 {
     _context    = context;
     _repository = repository;
 }
Ejemplo n.º 8
0
 public ProductServices(IMapper Mapper, PMContext Context)
 {
     mapper  = Mapper;
     context = Context;
 }
 public BaseRepository(PMContext context)
 {
     _context = context;
 }
Ejemplo n.º 10
0
 public BaseRepository(PMContext dbContext)
 {
     _dbContext = dbContext;
 }
 public CustomerService(PMContext Context, IMapper profile)
 {
     context       = Context;
     mapperProfile = profile;
 }
Ejemplo n.º 12
0
 public CategoryRepository(PMContext context)
     : base(context)
 {
 }
Ejemplo n.º 13
0
        public static void InitializeDbForTests(PMContext <Task> taskDb, PMContext <User> userDb, PMContext <Project> projectDb)
        {
            taskDb.Table.Add(new Task {
                ID = 001,
                AssignedToUserID = 001,
                CreatedOn        = DateTime.Now,
                ProjectID        = 001,
                Status           = TaskStatus.New,
                Detail           = "Test task"
            });
            taskDb.SaveChanges();

            userDb.Table.Add(new User {
                ID        = 001,
                FirstName = "tetFirst",
                LastName  = "testLast",
                Email     = "*****@*****.**",
                Password  = "******"
            });
            userDb.SaveChanges();

            projectDb.Table.Add(new Project
            {
                ID        = 001,
                Name      = "Test",
                CreatedOn = DateTime.Now,
                Detail    = "Test Project"
            });
            projectDb.SaveChanges();
        }
Ejemplo n.º 14
0
 public GenericRepository(PMContext context)
 {
     this._dbContext = context;
     this._dbSet     = this._dbContext.Set <T>();
 }
Ejemplo n.º 15
0
 public PeopleRepository(PMContext context, IMapper mapper) : base(context, mapper)
 {
 }
 public UserRepository(PMContext context) : base(context)
 {
     _context = context;
 }
Ejemplo n.º 17
0
 public ProjectsController(PMContext context)
 {
     _context = context;
 }
Ejemplo n.º 18
0
        private static void AddTestData(PMContext context)
        {
            User testUser1 = new User
            {
                Id        = 1,
                Email     = "*****@*****.**",
                FirstName = "Sunny",
                LastName  = "Kumar",
                Password  = "******"
            };

            User testUser2 = new User
            {
                Id        = 2,
                Email     = "*****@*****.**",
                FirstName = "Harsh",
                LastName  = "Verma",
                Password  = "******"
            };

            Task testTask1 = new Task
            {
                Id               = 3,
                ProjectID        = 1,
                Detail           = "this is a task 1 for management project1",
                CreatedOn        = DateTime.Parse(V),
                Status           = Entities.Enums.TaskStatus.New,
                AssignedToUserID = 1
            };

            Project testproject1 = new Project
            {
                Id        = 4,
                Name      = "ProjectManagement",
                Detail    = "this is a project management project",
                CreatedOn = DateTime.Parse(V)
            };

            Project testproject2 = new Project
            {
                Id        = 5,
                Name      = "ProjectManagement2",
                Detail    = "this is a project management project2",
                CreatedOn = DateTime.Parse(V)
            };



            Task testTask2 = new Task
            {
                Id               = 6,
                ProjectID        = 4,
                Detail           = "this is a task 2 for management project1",
                CreatedOn        = DateTime.Parse(V),
                Status           = Entities.Enums.TaskStatus.InProgress,
                AssignedToUserID = 2
            };

            Task testTask3 = new Task
            {
                Id               = 7,
                ProjectID        = 5,
                Detail           = "this is a task 1 for management project2",
                CreatedOn        = DateTime.Parse(V),
                Status           = Entities.Enums.TaskStatus.Completed,
                AssignedToUserID = 1
            };


            context.Users.Add(testUser1);
            context.Users.Add(testUser2);
            context.SaveChanges();

            context.Tasks.Add(testTask1);
            context.Tasks.Add(testTask2);
            context.Tasks.Add(testTask3);
            context.SaveChanges();
            context.Projects.Add(testproject1);
            context.Projects.Add(testproject2);

            context.SaveChanges();
        }
Ejemplo n.º 19
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, PMContext context)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            app.UseMvc();

            DbInitializer.Initialize(context);
        }
Ejemplo n.º 20
0
 public BaseRepository(PMContext pmContext)
 {
     _pmContext = pmContext;
 }
 public RoleRepository(PMContext context) : base(context)
 {
     _context = context;
     _dbSet   = context.Set <Role>();
     _dbSetParticipationHistories = context.Set <ProjectParticipationHistory>();
 }