roles
parent
a8463ce344
commit
2bdaf4301e
@ -0,0 +1,22 @@
|
||||
using System.Linq;
|
||||
using Microsoft.AspNet.Identity.EntityFramework;
|
||||
|
||||
namespace Yavsc.ViewModels.Administration
|
||||
{
|
||||
public class RoleInfo
|
||||
{
|
||||
public RoleInfo ()
|
||||
{
|
||||
|
||||
}
|
||||
public RoleInfo ( IdentityRole role)
|
||||
{
|
||||
Name = role.Name;
|
||||
Id = role.Id;
|
||||
Users = role.Users.Select(u => u.UserId).ToArray();
|
||||
}
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string[] Users { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
using Yavsc.Models.Auth;
|
||||
|
||||
namespace Yavsc.ViewModels.Administration
|
||||
{
|
||||
public class RoleUserCollection
|
||||
{
|
||||
public RoleUserCollection()
|
||||
{
|
||||
|
||||
}
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public UserInfo[] Users { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue