Updated from entityframework 6.0.0-beta1 to 6.0.0-rc1 and when logging into my MVC5 application i get the following error... {"Could not load type 'System.Data.Entity.DbSetExtensions' from assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, Publi...
I am trying to create a one to one relationship using C# in Entity Framework 6 using ASP.NET MVC 5 with built-in user authentication....I am able to make tables and connections with the defaults that Entity Framework creates. But when I try to use fluent ...
I am trying to customize IdentityUser class in asp.net identity....public class ApplicationUser : IdentityUser
{
public ApplicationUser()
{
IsBlocked = false;
}
public bool IsBlocked { get; set; }
}
...The problem is: when using c...
I'm using ASP.NET Identity with a new website and there don't seem to be many (any?) examples of how to do this in a decoupled manner. I do not want my domain model's ...DomainUser... class to have to inherit from ...Microsoft.AspNet.Identity.EntityFramew...
I have a class that seed the database which add 2 users with roles and custom fields. The problem I have is that it save the data in [dbo].[AspNetUsers] instead of [dbo].[IdentityUsers]. Both tables are created. When seeded, the data go into AspNetUser. W...
I'm working on an ASP.NET MVC 5 project in VS2013, .NET 4.5.1, that uses Entity Framework 6 Code-First. I have a decent size database built out and somewhat working (project is about two weeks old). I want to integrate user authentication now, but I'm not...
How can I limit the ...UserName... field in the table ...AspNetUsers...?...Neither this:...public class ApplicationUser : IdentityUser
{
[Required, MaxLength(15)]
public string UserName { get; set; }
}
...or this:...modelBuilder.Entity<Applicatio...
All works well till i decide to add IdentityUser collection in another entity as navigation property....One or more validation errors were detected during model generation:...IdentityUserLogin: : EntityType 'IdentityUserLogin' has no key defined. Define t...
I'm using ...Identity2.0... with ...MVC5...CodeFirst... I have extended both the ...IdentityUser... and ...IdentityRole... like this:...public class ApplicationUser : IdentityUser
{
[Required]
[StringLength(50)]
public string FirstName { get; ...
This has no problems:...public class ApplicationUserStore : UserStore<ApplicationUser, ApplicationRole, string, ApplicationUserLogin, ApplicationUserRole, ApplicationUserClaim>
{
public ApplicationUserStore(MyAppDb context)
: base(context)
...
Anybody know why ...UserManager.Create(user, password);... might be throwing ...EntityValidationError... saying ...Id... is required....Could it have something to do with my ...UserManager.... It is setup like this:...public class MyAppDb : IdentityDbCon...
Using examples from ...http://www.asp.net/identity... I've gotten this far. The ...RoleManager... works flawlessly and I treat the ...UserManager... the same. I think everything is correct, but I can't seem to new up a ...UserManager... correctly in a co...
Here is details of the error: ...There was an error running the selected code generator: 'Unable to
retrive metadata for 'Models.ApplicationUser'. Multiple object sets
per type are not supported. The objects sets 'ApplicationUsers' and
'Users' can b...
How can I limit the UserNameIndex UNIQUE index in the table AspNetUsers?...I am using ASP.NET Identity with a Mysql backend and am running up against another instance of:...Index column size too large. The maximum column size is 767 bytes.
...I have tried...
I have created new ASP MVC 5 app (with asp identity)....
I use ...IdentityDbContext... class to put all my domain objects inside....public class SecurityContext : IdentityDbContext{
...
public DbSet<Country> Countries { get; set; }
...When I first time cr...
I have a standard ...Identity... user in my app......public class ApplicationUser : IdentityUser<int, ApplicationUserLogin, ApplicationUserRole, ApplicationUserClaim>
{...
......Which has ...Id... as primary key.
...How can I change ...Id... to UserId?...
I have changed the asp Identity so that in database ...Id... column of ...AspNetIdentity... table be ...UserId...:...modelBuilder.Entity<ApplicationUser>()
.Property(p => p.Id)
.HasColumnName("UserId");
...A...
I have created my data layer with EF 6 code first and I am populating the db through ...Seed... method of ...EvInitializer... class inheriting from ...DropCreateDatabaseIfModelChanges.... The implementation of ...Seed... method is ...protected override vo...
I tough this would have been trivial and provided in the MVC template, but actually creating ASP.NET project > MVC 5/EF6 with Individual Account is giving me an email, password credentials combination. Strange considering the ...Getting Started... of Iden...
I have the following class derived from IdentityUser. Person class is stored in AspNetUsers table in the database, and everything looks good on the database-side....public class Person : IdentityUser
{
[Required]
[StringLength(50, ErrorMessage = "...