public static bool Login(string username, string password) { EFIdentity identity = new EFIdentity().GetIdentity(username, password); if (identity.IsAuthenticated) { EFPrincipal principal = new EFPrincipal(identity); HttpContext.Current.User = principal; return true; } return false; }
public EFPrincipal(EFIdentity identity) { _identity = identity; }