Beispiel #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app,
                              IHostingEnvironment env,
                              UserManager <User> usermanager,
                              RoleManager <IdentityRole> rolemanager,
                              KanbanContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            //DataInitializer.SeedData(usermanager, rolemanager, context).Wait();
            app.UseHttpsRedirection();
            app.UseStaticFiles();
            app.UseAuthentication();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "Default",
                    template: "{controller}/{action}/{id?}",
                    defaults: new { controller = "Project", action = "AllProjects" });
            });
        }
Beispiel #2
0
        public static void ResetIssuesPosition(int columnId)
        {
            KanbanContext db       = new KanbanContext();
            var           issues   = db.Issues.Where(c => c.ColumnId == columnId).OrderBy(p => p.Position).ToList();
            int           position = 1;

            foreach (Issue iss in issues)
            {
                iss.Position        = position;
                db.Entry(iss).State = EntityState.Modified;
                position++;
            }
            db.SaveChanges();
        }
Beispiel #3
0
        private static void Seed(KanbanContext context)
        {
            if (context.Usuario.FirstOrDefault(x => x.Login == "letscode") == null)
            {
                context.Usuario.Add(new Usuario
                {
                    UserId = Guid.NewGuid(),
                    Login  = "******",
                    Senha  = "lets@123"
                });

                context.SaveChanges();
            }
        }
Beispiel #4
0
 public static void Initialize(KanbanContext context)
 {
     if (!context.Tickets.Any())
     {
         context.Tickets.AddRange(
             new Ticket {
             Id = Guid.NewGuid().ToString(), Title = "Установить React", Description = "Необходим для проекта Kanban доски", Priority = 1
         },
             new Ticket {
             Id = Guid.NewGuid().ToString(), Title = "Дизайн классов Kanban", Description = "Разработать дизайн классов для тестового задания)))", Priority = 1
         },
             new Ticket {
             Id = Guid.NewGuid().ToString(), Title = "База данных", Description = "Создать и проинициализировать базу данных", Priority = 2
         },
             new Ticket {
             Id = Guid.NewGuid().ToString(), Title = "UI", Description = "Реализовать UI с использованием стека NET CORE MVC - React", Priority = 3
         }
             );
         context.SaveChanges();
     }
 }
Beispiel #5
0
 public TechnologyRepository(KanbanContext context)
 {
     _context = context;
 }
Beispiel #6
0
 public WorkloadExtraRepository(KanbanContext context)
 {
     _context = context;
 }
 public PermissionsController(KanbanContext context)
 {
     _context = context;
 }
Beispiel #8
0
 public FiscalYearRepository(KanbanContext context)
 {
     _context = context;
 }
 public Board_MembersController(KanbanContext context)
 {
     _context = context;
 }
Beispiel #10
0
 public ActivityRepository(KanbanContext context)
 {
     _context = context;
 }
Beispiel #11
0
 public BoardController(KanbanContext kanbanContext)
 {
     _db = kanbanContext;
 }
Beispiel #12
0
 public ListController(KanbanContext context)
 {
     _context = context;
 }
Beispiel #13
0
 public static void Initialize(KanbanContext context)
 {
     Seed(context);
 }
Beispiel #14
0
 public CommentController(KanbanContext context)
 {
     _context = context;
 }
Beispiel #15
0
 public TestManager(KanbanContext context)
 {
     _context = context;
 }
Beispiel #16
0
 public IssueService(UserManager <User> usermanager, KanbanContext dbcontext)
 {
     this._dbcontext   = dbcontext;
     this._usermanager = usermanager;
 }
Beispiel #17
0
 public UserRepository(KanbanContext context)
 {
     _context = context;
 }
Beispiel #18
0
 public ManagersController(UserManager <ApplicationUser> userManager, KanbanContext db)
 {
     _db          = db;
     _userManager = userManager;
 }
Beispiel #19
0
 public TableController(KanbanContext context)
 {
     db = context;
 }
 public ToDoListsController(KanbanContext db)
 {
     _db = db;
 }
Beispiel #21
0
 public TaskRepository(KanbanContext kanbanContext)
 {
     _kanbanContext = kanbanContext;
 }
Beispiel #22
0
 public BoardService(KanbanContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Beispiel #23
0
 public UserService(UserManager <User> usermanager, KanbanContext dbcontext)
 {
     _usermanager = usermanager;
     _dbcontext   = dbcontext;
 }
Beispiel #24
0
 public UsersController(KanbanContext context)
 {
     _context = context;
 }
 public ListaTarefaKanbanRepository(KanbanContext context)
 {
     _context = context;
 }
 public BoardService(KanbanContext context)
 {
     _context = context;
 }
Beispiel #27
0
 public ReportRepository(KanbanContext context)
 {
     _context = context;
 }
 public ProjectsController(UserManager <ApplicationUser> userManager, KanbanContext db)
 {
     _userManager = userManager;
     _db          = db;
 }
Beispiel #29
0
 public BoardService()
 {
     _context = new KanbanContext();
 }
Beispiel #30
0
 public ListService()
 {
     _context = new KanbanContext();
 }