public async Task <IActionResult> Create([Bind("sveSobe,ID,ime,prezime,email,adresaStanovanja,brojTelefona")] Recepcioner recepcioner)
        {
            if (ModelState.IsValid)
            {
                String password = CreatePassword();
                var    user     = new MojRegisteredUser {
                    firstName = recepcioner.ime, lastName = recepcioner.prezime, UserName = recepcioner.email, Email = recepcioner.email
                };
                var result = await _userManager.CreateAsync(user, password);

                if (result.Succeeded)
                {
                    Console.WriteLine("Uspjesno");
                    var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);

                    var resultConfirma = await _userManager.ConfirmEmailAsync(user, code);

                    var aspUserID = await _userManager.FindByIdAsync(user.Id);

                    if (aspUserID != null)
                    {
                        Console.WriteLine("User id: " + user.Id + ", a ime je " + user.UserName);
                        recepcioner.aspUser = aspUserID;
                        Console.WriteLine("Recepcioner asp id: " + recepcioner.aspUser.Id);
                    }
                    _context.Add(recepcioner);
                    await _context.SaveChangesAsync();
                }
                await EmailSender.PosaljiEmail(recepcioner.email, "Sifra za recepcionera", "Vas password je " + password, "Sef Hilberta");

                return(RedirectToAction(nameof(Index)));
            }
            return(View(recepcioner));
        }
        public async Task <IActionResult> Edit(int id, [Bind("sveSobe,ID,ime,prezime,email,adresaStanovanja,brojTelefona")] Recepcioner recepcioner)
        {
            if (id != recepcioner.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(recepcioner);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!RecepcionerExists(recepcioner.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(recepcioner));
        }