Re-fabrication

This commit is contained in:
Paul Schneider 2018-03-26 19:27:29 +02:00
commit cb6309abdb
499 changed files with 7574 additions and 12530 deletions

View file

@ -0,0 +1,11 @@
namespace Yavsc.ViewModels.Administration {
public class AdminViewModel {
public RoleInfo [] Roles { get; set; }
public int AdminCount { get; set; }
public bool YouAreAdmin { get; set; }
public int UserCount { get; set; }
}
}

View file

@ -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; }
}
}

View file

@ -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; }
}
}