27 lines
665 B
C#
27 lines
665 B
C#
using Labaratory.Models;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Labaratory.Services
|
|
{
|
|
public static class AuthService
|
|
{
|
|
public static void LogAttempt(string login, bool isSuccess)
|
|
{
|
|
using (var db = new Models.LaboratoryDBEntities())
|
|
{
|
|
db.LoggnHistories.Add(new Models.LoggnHistory
|
|
{
|
|
AttemptTime = DateTime.Now,
|
|
Login = login,
|
|
IsSuccess = isSuccess
|
|
});
|
|
db.SaveChanges();
|
|
}
|
|
}
|
|
}
|
|
}
|