// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
namespace Microsoft.AspNet.Identity
{
///
/// Represents a Role entity
///
public class IdentityRole : IdentityRole
{
///
/// Constructor
///
public IdentityRole()
{
Id = Guid.NewGuid().ToString();
}
///
/// Constructor
///
///
public IdentityRole(string roleName) : this()
{
Name = roleName;
}
}
///
/// Represents a Role entity
///
///
public class IdentityRole where TKey : IEquatable
{
///
/// Constructor
///
public IdentityRole()
{
Users = new List>();
Claims = new List>();
}
///
/// Constructor
///
///
public IdentityRole(string roleName)
: this()
{
Name = roleName;
}
///
/// Navigation property for users in the role
///
public virtual ICollection> Users { get; private set; }
///
/// Navigation property for claims in the role
///
public virtual ICollection> Claims { get; private set; }
///
/// Role id
///
public virtual TKey Id { get; set; }
///
/// Role name
///
public virtual string Name { get; set; }
}
}