I am writing to seek, help/examples in how can I link the following code to pass user credientials using the enity framework.
public class LoginProvider: IProvidePrincipal
{
private api_login user;
public IPrincipal CreatePrincipal(string username, string password)
{
if (username != user.username || password != user.password)
{
return null;
}
var identity = new GenericIdentity(username);
IPrincipal principal = new GenericPrincipal(identity, new[] { "User" });
return principal;
}
}
using System;
using System.Collections.Generic;
public partial class api_login
{
public string ID { get; set; }
public string username { get; set; }
public string password { get; set; }
public string description { get; set; } ...
Go to the complete details ...