2022-06-30 21:37:20 +02:00
using System.Security.Claims ;
using System.Threading.Tasks ;
using Microsoft.AspNet.Identity ;
using Microsoft.AspNet.Identity.EntityFramework ;
using Microsoft.AspNet.Identity.Owin ;
namespace RMDataManager.Models
{
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit https://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
public class ApplicationUser : IdentityUser
{
public async Task < ClaimsIdentity > GenerateUserIdentityAsync ( UserManager < ApplicationUser > manager , string authenticationType )
{
// Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
var userIdentity = await manager . CreateIdentityAsync ( this , authenticationType ) ;
// Add custom user claims here
return userIdentity ;
}
}
public class ApplicationDbContext : IdentityDbContext < ApplicationUser >
{
public ApplicationDbContext ( )
2022-07-23 23:57:12 +02:00
: base ( "EFData" , throwIfV1Schema : false )
2022-06-30 21:37:20 +02:00
{
}
public static ApplicationDbContext Create ( )
{
return new ApplicationDbContext ( ) ;
}
}
}