Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating a Custom Implementation using Guid and Custom Table names with Asp.net Identity 1.1 Alpha
    primarykey
    data
    text
    <p>I'm drawing from different questions (listed below as I ask the question).</p> <p>I would like to do five things and as far as I can tell from these questions and answers... all of this can be done in my OnModelCreating method.</p> <p><strong>Preface</strong>: I am using the latest nightly bits for Asp.Net Identity 1.1-alpha</p> <ul> <li><p>I would like to use "UserId" instead of Id as the property for my Users Id in the AspNetUsers table. I understand this would involve using "HasColumnName" during OnModelCreating.</p></li> <li><p>I would like to use Guid (uniqueidentifier) as the data type for my UserId (instead of string). I understand that this involves using my own POCOS for IUser class and IUserStore, etc as Hao Kung Indicates in his answer here...</p></li> </ul> <p><a href="https://stackoverflow.com/questions/19553424/how-to-change-type-of-id-in-microsoft-aspnet-identity-entityframework-identityus/19577113#19577113">How to change type of id in Microsoft.AspNet.Identity.EntityFramework.IdentityUser</a></p> <ul> <li>I would like to use my own custom table names such as MyRoles, MyCUserClaims, MyUserLogins, MyUserRoles, MyUsers as indicated in this answer...</li> </ul> <p><a href="https://stackoverflow.com/questions/19460386/how-can-i-change-the-table-names-when-using-visual-studio-2013-aspnet-identity">How can I change the table names when using Visual Studio 2013 ASP.NET Identity?</a></p> <ul> <li>All the foreign keys should be mapped apppropriately with the Asp.net Identity tables as Hao Kung shows here...</li> </ul> <p><a href="https://stackoverflow.com/questions/19932993/create-asp-net-identity-tables-using-sql-script/20057794#20057794">Create ASP.NET Identity tables using SQL script</a></p> <ul> <li>I would like to add properties to the ApplicationUser of FirstName and LastName.</li> </ul> <p>So, based on the above... can someone provide me with the OnModelCreating method which would create these Identity tables accordingly, with UserId as the Id column for the users of type Guid (uniqueidentifier), in tables with custom names, with the appropriate foreign key relationships, and with two additional properties on ApplicationUser of FirstName and LastName?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload