firstCommit
This commit is contained in:
19
RentACar/Data/Services/AuthenticationService.cs
Normal file
19
RentACar/Data/Services/AuthenticationService.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Data.Entities;
|
||||
|
||||
namespace Data.Services
|
||||
{
|
||||
public class AuthenticationService
|
||||
{
|
||||
public User LoggedUser { get; private set; }
|
||||
public void AuthenticateUser(string username, string password)
|
||||
{
|
||||
RentACarDbContext context = new RentACarDbContext();
|
||||
this.LoggedUser = context.Users.FirstOrDefault(u => u.Username == username && u.Password == password);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user