public async Task <IEnumerable <AdminUserListingModel> > All() { var users = new List <AdminUserListingModel>(); foreach (var u in this.db.Users) { var boola = await _userManager.IsInRoleAsync(u, "Administrator"); var user = new AdminUserListingModel { Name = u.Name, Username = u.UserName, Email = u.Email, Id = u.Id, }; user.IsInRole = boola; users.Add(user); } return(users.OrderBy(u => u.Username)); }
public static string ToHtml(this AdminUserListingModel user) => $@"