Changes in validator
This commit is contained in:
@@ -1,36 +0,0 @@
|
|||||||
using Models;
|
|
||||||
using Models.Models;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Business.Business.UserManagment
|
|
||||||
{
|
|
||||||
public class CredentialChecker
|
|
||||||
{
|
|
||||||
private LuminousContext context;
|
|
||||||
public bool CheckIfUserIsCreated()
|
|
||||||
{
|
|
||||||
using (context = new LuminousContext())
|
|
||||||
{
|
|
||||||
if (context.User.ToList().Any())
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public bool CheckPassword(string Password)
|
|
||||||
{
|
|
||||||
using (context = new LuminousContext())
|
|
||||||
{
|
|
||||||
if (context.User.ToList().Exists(user => user.Password == Password))
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,5 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using Business.Business.UserManagment;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Display
|
namespace Display
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,11 @@ namespace Display
|
|||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
var InitialCreation = new CreateInitialUser("Admin", "Admin", "pass123");
|
var val = new Business.Business.UserManagment.Validator();
|
||||||
|
if ()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user