I am very new to asp.net (mvc) and I am trying to build a sample admin mvc4 app where I can get a list of users with the new membership schema.
I am very confused with the new membership, it seems that if I want to use the out-of-the-box SimpleMembershipProvider I can't use methods built-in with the old asp.net membership and I have to implement all the methods by myself, especially if I want to use EF (is that right?)
Here is a sample code (working with the old provider) of what I am trying to achieve with the new provider
controller
public class MemberController : Controller
{
public ActionResult Index()
{
var users = Membership.GetAllUsers();
return View(users);
}
}
view
<ul>
@foreach (var item in Model)
{
<li>@Html.DisplayFor(model => model[item.ToString()].UserName)</li>
}
</ul>
I would be very pleased if someone could provide me the steps, guideline, or source in order to implement this, the right way (did I have to create my own custom membership provider?). I know it's something really basic but It could help me to understand. Thank you