public async Task <IActionResult> Create([Bind("Id,Name,Description")] Project project)
        {
            if (ModelState.IsValid)
            {
                _context.Add(project);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(project));
        }
        public async Task <IActionResult> Create([Bind("Id,AspUser,FirstName,Surname,TeamId,IsLeader")] User user)
        {
            if (ModelState.IsValid)
            {
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["TeamId"] = new SelectList(_context.Teams, "Id", "Id", user.TeamId);
            return(View(user));
        }
        public async Task <IActionResult> Create([Bind("Id,Name,ProjectId")] Team team)
        {
            if (ModelState.IsValid)
            {
                _context.Add(team);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ProjectId"] = new SelectList(_context.Projects, "Id", "Id", team.ProjectId);
            return(View(team));
        }
        public async Task <IActionResult> Create([Bind("Id,DateFrom,DateTo,QueryCreationDate,HalfDayVacation,IsApproved,ApplicantId,Type")] Vacation vacation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(vacation);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ApplicantId"] = new SelectList(_context.Users, "Id", "Id", vacation.ApplicantId);
            return(View(vacation));
        }