From 4e5bba35da259fa79a90426ed02a72f0c03ec861 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Mon, 8 Jun 2015 14:32:39 -0700 Subject: [PATCH] Friendlier ToString --- .../IdentityRole.cs | 9 +++++++++ .../IdentityUser.cs | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs index 6185d53dd9..c479b9ad82 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityRole.cs @@ -71,5 +71,14 @@ namespace Microsoft.AspNet.Identity.EntityFramework /// A random value that should change whenever a role is persisted to the store /// public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString(); + + /// + /// Returns a friendly name + /// + /// + public override string ToString() + { + return Name; + } } } \ No newline at end of file diff --git a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs index 2b8ef99ff3..ce9932f5e0 100644 --- a/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs +++ b/src/Microsoft.AspNet.Identity.EntityFramework/IdentityUser.cs @@ -103,5 +103,14 @@ namespace Microsoft.AspNet.Identity.EntityFramework /// Navigation property for users logins /// public virtual ICollection> Logins { get; } = new List>(); + + /// + /// Returns a friendly name + /// + /// + public override string ToString() + { + return UserName; + } } }