using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkFlowCheck.Common.Security;

namespace WorkFlowCheck.DL.Seed
{
    public static class DBInitializer
    {
        public static void Seed(AppDbContext dbContext)
        {
            var user = dbContext.Users.Where(w => w.Email == "info@wfcapi.hu").FirstOrDefault();
            if (user != null && user.PasswordHash == null)
            {
                user.PasswordHash = PasswordHasher.HashPassword("861354");
                dbContext.SaveChanges();
            }
        }
    }
}
