zzz projects Entity Framework Core EF Core
Home EF Core 5 Articles Knowledge Base Online Examples
  • Home
  • EF Core 5
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework Core - Knowledge Base (KB)

42 results for: in tag: asp.net-core-identity

Asp.net Core Get User by User Id

Using Asp.net Core Identity and entity framework core, how can I get an asp.net user object by it's UserId property? I know it's possible to get the current logged in user from the HttpContext.User object using:...UserManager.GetUserAsync(HttpContext.Use...
asp.net-core asp.net-core-identity entity-framework-core
asked by big_water

Move identity to a class library ASP.Net Core

I have developed a new project based on ASP.Net core. I have moved all my EF code (Models,mappings, DbContext) into a dedicated DAL class library in order to follow the Single responsibility principle of the SOLID rules....However, I need now to add authe...
asp.net-core asp.net-core-identity entity-framework-core
asked by Sylvain C.

ASP NET Core Identity with Entity Framework custom DbContext

I've tried reading the docs on ASP.NET Core Identity and Entity Framework. But I feel still non the wiser....I don't want to have anything to do with ...IdentityDbContext..., ...IdentityUser..., ...IdentityRole.... I just want to use my own ...DbContext..
asp.net-core asp.net-core-identity entity-framework-core
asked by Andez

How to disable account if user login fails continuously in Asp.Net Core identity

Currently, I'm using Asp.net core 1.1, EF core & Asp.net core Identity in my system. I have a configure below in ...startup.cs... class for the password policy....Is there a configure to disable account when a user continuously login fails?...services.Con...
asp.net-core asp.net-core-identity asp.net-identity c# entity-framework-core
asked by Hung Quach

Seed ASP.NET Core 1.1 database with a default super-user

I'm starting a new ASP.NET Core MVC project using Identity for authentication. I'd like to add a default super-user to the asp database, so it could add new users then, but i don't know how to do that....First, i don't know if it is a good idea to use the...
asp.net-core-1.1 asp.net-core-identity c# entity-framework-core
asked by MorgoZ

Loading custom ApplicationUser object from database

I am using ASP.NET Core 2.0 with Identity and Entity Framework. I have extended the ...IdentityUser... class into the ...ApplicationUser... below:...namespace TxTools.Data.Features.Shared.Models { public class ApplicationUser : IdentityUser { ...
asp.net-core asp.net-core-identity c# entity-framework entity-framework-core
asked by Greg Hunt

How to merge Identity dbcontext with application context?

I'm not able to read data from Application Identity Users. I'm beginner, any idea? There is no error while compiling. But I cannot add new task....I get the error while creating a task ...https://localhost:44312/usertasks/Create...The issue is on GET meth...
asp.net-core asp.net-core-identity c# entity-framework-core
asked by Lukas

Relate Code-First to Identity ApplicationUser in .NET Core 2.0

I have a Core 2.0 project that has reached the point where I need to start linking users to the data I have. It started as a one user test bed that now requires me to have multiple per user....User Model:...public class ApplicationUser : IdentityUser { ...
asp.net-core asp.net-core-2.0 asp.net-core-identity c# entity-framework-core
asked by Beau D'Amore

How to load navigation properties on an IdentityUser with UserManager

I've extended ...IdentityUser... to include a navigation property for the user's address, however when getting the user with ...UserManager.FindByEmailAsync..., the navigation property isn't populated. Does ASP.NET Identity Core have some way to populate ...
asp.net-core asp.net-core-identity c# entity-framework-core
asked by Mourndark

Customize IdentityUserRole in ASP.NET Core

In my asp dotnet core application, I'm changing the default ...IdentityUser... and the ...IdentityRole... into my own classes ...MesUser... and ...MesRole...public class MesUser : IdentityUser<int>, IUser { #region Property /// <summary> /// ...
asp.net-core asp.net-core-identity c# entity-framework-core
asked by petr cizek

How to flatten Entity Core many-to-many collections using Linq

I can't figure out how to flatten a many to many collection. The entities are for the Identity tables created with Entity Framework Core. They contain navigation properties I added manually because the Identity entities don't include these by default (alo...
asp.net-core-identity automapper c# entity-framework-core linq
asked by Alex

Accessing by DbContext vs UserManager

Is there drawbacks or advantages in using either UserManager or DbContext?...If I use this:...public class UserManager<TUser> : IDisposable where TUser : class public virtual Task<TUser> FindByIdAsync(string userId); ...Or if I use direct dbcontext like:...
asp.net-core asp.net-core-identity c# entity-framework-core
asked by Lora

.net core 2 Entity Framework - ApplicationUser Extended Foreign Key object not populating on get

I've extended the ApplicationUser to include a OrganizationId and a Organization object that is supposed to map to a foreign Organization table. This works fine on initial user registration - if it is an existing Organization, I just populate the Organiza...
.net-core .net-core-2.0 asp.net-core-identity c# entity-framework-core
asked by James Huang

Filter expression cannot be specified for an entity type because it may only be applied to the root entity type in a hierarchy

I am trying to change the way asp.net generates its identity tables, trying to base the generation on an Id of int instead of a Guid(string), also adding a different schema(instead of dbo -> Security) and a QueryFilter for all my entities, in that case I ...
asp.net-core asp.net-core-identity entity-framework-core
asked by Zinov

.NET Core 2.1 Identity get all users with their associated roles

I'm trying to pull out all my Identity users and their associated roles for a user management admin page. I thought this would be reasonably easy but apparently not. I've tried following the following solution: ...https://stackoverflow.com/a/43562544/5392...
asp.net-core asp.net-core-identity c# entity-framework-core mysql
asked by Andy Furniss

Creating dynamic role-based authorization

I have implemented Identity Role-based authorization but having to manually go to each controller/action and specify individually ...[Authorize(Roles = "")]... very poor extensibility. ...How would I be able to create a UI screen, with dynamic role-based ...
asp.net-core-identity entity-framework-core
asked by LinkedListT

.NET Core 2.x Identity int foreign key cannot target int primary key

I have a web application running .net core 2.x (just upgraded from .net core 1.x finally) and I've gotten most everything ported from .net core 1.x to 2.x. I have however hit a brick wall with my Identity implementation. It worked fine with .net core 1.x ...
asp.net-core asp.net-core-identity c# entity-framework-core invalidoperationexception
asked by Jerri Kangasniemi

Using .Net Core Identity with generic repository

So I'm trying to get my head around this for a while now, but I don't seem to succeed. In my application I'm using a generic repository with Entity Framework Core. Hence my Repository always expect that it's accessed from a class who's BaseEntity or has i...
asp.net-core-identity asp.net-core-mvc entity-framework-core
asked by B.Pumpkin

Dot Net Core Identity User reference as Foreign in ApplicationDBContext

I am using the Identity DB context and the Application DB context, I have a table (UserVehicles) in which I did foreign key reference with the ApplicationUser(Identity User) property, when I add migration for the ApplicationDBContext it is creating the sc...
.net-core asp.net-core-identity entity-framework-core identity
asked by Sandeep QI

Attempting to create ASP.Net Core Identity data in an existing table with existing user records

I have a new ASP.Net Core website that uses an existing database, to which I have added ASP.Net Core Identity for user management. ...Since there is an existing user table, I simply added the which I have properly added the ASP.Net identity columns. ....
asp.net-core asp.net-core-identity c# entity-framework-core
asked by Ev Conrad

Page 1 of 3
  • 1
  • 2
  • 3
  • ยป

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79