I created an empty MVC project (ASP.NET Web Application) using Visual Studio 2013 Update 2 RC & amp; then added AspNet authentication patterns using:
PM> Installation Package Microsoft.AspNet.Identity.Samples -Pre
I enabled and added migrations, and then updated the database that created the tables by default.

I want to create a Customer table that contains 2 columns as foreign keys:
- Group table (GroupId column)
- AspNetUsers table (identifier column)
So, I created 2 classes Customer and Group and added foreign keys using data annotations as shown below:
namespace IdentitySample.Models
{
public class ApplicationUser : IdentityUser
{
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
{
var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
return userIdentity;
}
}
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("DefaultConnection", throwIfV1Schema: false)
{
}
static ApplicationDbContext()
{
Database.SetInitializer<ApplicationDbContext>(new ApplicationDbInitializer());
}
public static ApplicationDbContext Create()
{
return new ApplicationDbContext();
}
public DbSet<Customer> Customers { get; set; }
public DbSet<Group> Groups { get; set; }
}
public class Customer
{
public int CustomerId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public int GroupId { get; set; }
public string CreatedBy { get; set; }
[ForeignKey("GroupId")]
public Group Groups { get; set; }
[ForeignKey("CreatedBy")]
public ApplicationUser ApplicationUsers { get; set; }
}
public class Group
{
public int GroupId { get; set; }
public string GroupName { get; set; }
}
}
, ApplicationDbContext.edmx, EF Power, .

CustomerController, "MVC 5 Controller , Entity Framework".

( db.ApplicationUsers)
public ActionResult Create()
{
ViewBag.CreatedBy = new SelectList(db.ApplicationUsers, "Id", "Email");
ViewBag.GroupId = new SelectList(db.Groups, "GroupId", "GroupName");
return View();
}

:
"IdentitySample.Models.ApplicationDbContext" "ApplicationUsers" "ApplicationUsers" , "IdentitySample.Models.ApplicationDbContext" ( using ?)
ApplicationDbContext
public DbSet<ApplicationUser> ApplicationUsers { get; set; }
:
. "ApplicationUsers" "Users" 'IdentitySample.Models.ApplicationUser'
CreatedBy AspNetUsers, , CreateBy, GroupId:

, Identity, , , , Identity. , "MVC 5 Controller , Entity Framework"?
( , Customers Groups, Customers ExternalIndkey GroupId)