I am building the admin side of the project at the moment where I will have to : - create new users and add some more specific information about them (i.e. location, position etc.) - different users will have to be assigned to different roles,
What I wanted to do first was to pull the information of existing users inner join the data with the information in the additional table and filter by different roles
public class UserDetail
{
[HiddenInput(DisplayValue = false)]
public string UserId { get; set; }
public int StoreID { get; set; }
public string PositionID { get; set; }
}
In the controller, I wanted to do a simple thing at first to inner join the data from Membership class and inner join with the above UserDetail class at UserID level. So I used the following piece of code
public ActionResult Index()
{
var allSystemUsers = Membership.GetAllUsers().Cast<MembershipUser>()
.Select(user => new {user.UserName, user.Email, user.CreationDate, user.LastLoginDate });
return View();
}
The problem is that I don't know how to pull first the people in certain roles only instead all of them and then how to inner join with the above UserDetail class.
Once I have Index ActionaResult I hope I should be able to create - Create and Edit functionality