// 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.Entity
{
///
/// Represents a Role entity
///
public class EntityRole : EntityRole
{
///
/// Constructor
///
public EntityRole()
{
Id = Guid.NewGuid().ToString();
}
///
/// Constructor
///
///
public EntityRole(string roleName)
: this()
{
Name = roleName;
}
}
///
/// Represents a Role entity
///
///
///
public class EntityRole
where TUserRole : IdentityUserRole
where TKey : IEquatable
{
///
/// Constructor
///
public EntityRole()
{
Users = new List();
}
///
/// Navigation property for users in the role
///
public virtual ICollection Users { get; private set; }
///
/// Role id
///
public virtual TKey Id { get; set; }
///
/// Role name
///
public virtual string Name { get; set; }
}
}