Files
rent-a-car/RentACar/Data/Services/AuthenticationService.cs
ani_konarcheva@abv.bg 982a6a66dd firstCommit
2022-03-25 16:24:21 +02:00

20 lines
544 B
C#

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);
}
}
}