I have a need to create a simple user administration page where I can simply show a list of users and change their passwords. The application isn't very big so there are only a handful of users using the system but like any infrastructure they sometimes forget what their passwords are. I need a simple solution to do this.
I created an Admin controller
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MyProject.Models;
using MyProject.ViewModels;
using Microsoft.AspNet.Identity.EntityFramework;
namespace MyProject.Controllers
{
public class AdminController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult Users()
{
var context = new ApplicationDbContext();
var allusers = context.Users;
return View(allusers);
}
}
}
I need some help retuning this list to a view and also creating the crucial password reset part as well. There seem to be quite a few different ways of doing this so I'm a bit confused as to how I can approach it.