* Added Logger and Exception manager

* Added autocreate database if not exists
This commit is contained in:
CMS4390\marantalu
2017-12-05 17:21:10 +01:00
parent 1e56f6e6d3
commit 2b9f74a1b2
39 changed files with 4892 additions and 116 deletions
+2 -2
View File
@@ -42,7 +42,7 @@ namespace Step.Database.Controllers
public UserModel Find(int id)
{
// Find user by Id with Role object included
return dbCtx.Users.Include("Role").Where(u => u.UserId == id).First();
return dbCtx.Users.Include("Role").Where(u => u.UserId == id).FirstOrDefault();
}
public UserModel Find(string username)
@@ -59,7 +59,7 @@ namespace Step.Database.Controllers
if (user != null)
{
// Check if the passwords match
if (Crypto.VerifyHashedPassword(user.Password, password) != true)
if (Crypto.VerifyHashedPassword(user.GetPassword(), password) != true)
{
return null;
}