public static User GetUserByCredentials(string login, string password) { using (WebAPIDBContext entities = new WebAPIDBContext()) { var result = entities.Users.FirstOrDefault(user => user.Login.Equals(login, StringComparison.OrdinalIgnoreCase) && user.Password == password); entities.Dispose(); return(result); } }
public static bool Login(string login, string password) { using (WebAPIDBContext entities = new WebAPIDBContext()) { var result = entities.Users.Any(user => user.Login.Equals(login, StringComparison.OrdinalIgnoreCase) && user.Password == password); entities.Dispose(); return(result); } }
public CityInfoesController(WebAPIDBContext context) { _context = context; }
public SubjectsController(WebAPIDBContext context) { _context = context; }
public UserService() { _entities = new WebAPIDBContext(); }
public StudentsController(WebAPIDBContext context) { _context = context; }