2018-06-05 19:09:29 +00:00
using System.Data.Entity ;
using System.Security.Claims ;
using System.Threading.Tasks ;
using Microsoft.AspNet.Identity ;
using Microsoft.AspNet.Identity.EntityFramework ;
2018-06-08 19:11:02 +00:00
namespace AYA.SlnSinort.Mantenimientos.Models
2018-06-05 19:09:29 +00:00
{
// Puede agregar datos del perfil del usuario agregando más propiedades a la clase ApplicationUser. Para más información, visite http://go.microsoft.com/fwlink/?LinkID=317594.
public class ApplicationUser : IdentityUser
{
public async Task < ClaimsIdentity > GenerateUserIdentityAsync ( UserManager < ApplicationUser > manager )
{
// Tenga en cuenta que el valor de authenticationType debe coincidir con el definido en CookieAuthenticationOptions.AuthenticationType
var userIdentity = await manager . CreateIdentityAsync ( this , DefaultAuthenticationTypes . ApplicationCookie ) ;
// Agregar aquí notificaciones personalizadas de usuario
return userIdentity ;
}
}
public class ApplicationDbContext : IdentityDbContext < ApplicationUser >
{
public ApplicationDbContext ( )
: base ( "DefaultConnection" , throwIfV1Schema : false )
{
}
public static ApplicationDbContext Create ( )
{
return new ApplicationDbContext ( ) ;
}
}
}