using System.Diagnostics;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Sequence.Entities;
using Sequence.Models;

namespace Sequence.Controllers;

public class AccountController : Controller
{
    private readonly UserManager<User> userManager;

    public AccountController(UserManager<User> userManager)
    {
        this.userManager = userManager;
    }

    public async Task<IActionResult> CreateUsers()
    {
        var resultKrystle = await userManager.CreateAsync(new Entities.User
        {
            Name = "Krystle",
            UserName = "krystle",
            Email = "krystle@allwillynilly.com"
        }, "C0urtY@rd");

        var resultRyan = await userManager.CreateAsync(new Entities.User
        {
            Name = "Ryan",
            UserName = "ryan",
            Email = "ryan@binarydad.com"
        }, "C0urtY@rd");

        return View();
    }
}
