// 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" }); }); }
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(); }
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(); } }
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(); } }
public TechnologyRepository(KanbanContext context) { _context = context; }
public WorkloadExtraRepository(KanbanContext context) { _context = context; }
public PermissionsController(KanbanContext context) { _context = context; }
public FiscalYearRepository(KanbanContext context) { _context = context; }
public Board_MembersController(KanbanContext context) { _context = context; }
public ActivityRepository(KanbanContext context) { _context = context; }
public BoardController(KanbanContext kanbanContext) { _db = kanbanContext; }
public ListController(KanbanContext context) { _context = context; }
public static void Initialize(KanbanContext context) { Seed(context); }
public CommentController(KanbanContext context) { _context = context; }
public TestManager(KanbanContext context) { _context = context; }
public IssueService(UserManager <User> usermanager, KanbanContext dbcontext) { this._dbcontext = dbcontext; this._usermanager = usermanager; }
public UserRepository(KanbanContext context) { _context = context; }
public ManagersController(UserManager <ApplicationUser> userManager, KanbanContext db) { _db = db; _userManager = userManager; }
public TableController(KanbanContext context) { db = context; }
public ToDoListsController(KanbanContext db) { _db = db; }
public TaskRepository(KanbanContext kanbanContext) { _kanbanContext = kanbanContext; }
public BoardService(KanbanContext context, IMapper mapper) { _context = context; _mapper = mapper; }
public UserService(UserManager <User> usermanager, KanbanContext dbcontext) { _usermanager = usermanager; _dbcontext = dbcontext; }
public UsersController(KanbanContext context) { _context = context; }
public ListaTarefaKanbanRepository(KanbanContext context) { _context = context; }
public BoardService(KanbanContext context) { _context = context; }
public ReportRepository(KanbanContext context) { _context = context; }
public ProjectsController(UserManager <ApplicationUser> userManager, KanbanContext db) { _userManager = userManager; _db = db; }
public BoardService() { _context = new KanbanContext(); }
public ListService() { _context = new KanbanContext(); }