demo_trade/Data/Repository/SQLLoginRepository.cs
2024-10-04 15:41:04 +03:00

28 lines
689 B
C#

using demo_trade.Data.RemoteData.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace demo_trade.Data.Repository
{
public class SQLLoginRepository : ILoginRepository
{
private TradeContext _tradeContext;
public SQLLoginRepository() {
_tradeContext = new TradeContext();
}
public void Dispose()
{
Dispose();
GC.SuppressFinalize(this);
}
public User? GetUserByLogin(string login)
{
return _tradeContext.Users.Where(user => user.Userlogin == login).FirstOrDefault();
}
}
}