1234567891011121314151617181920212223242526272829 |
- using Microsoft.EntityFrameworkCore;
- using OOO_WriteAndClear.DBModels;
- using OOO_WriteAndClear.MVP.MVPInterfaces;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OOO_WriteAndClear.MVP.Models
- {
- public class AuthorizationUserControlModel : IAuthorizationContract.IModel
- {
- public AuthorizationUserControlModel()
- {
- }
- public User? AuthorizationUserInSystem(string login, string password)
- {
- User? user;
- using (VorobiewTradeContext DB = new VorobiewTradeContext())
- return user = DB.Users.Include(a => a.UserRoleNavigation)
- .Where(a => a.UserLogin == login && a.UserPassword == password)
- .FirstOrDefault();
- }
- }
- }
|