why validate return null although i have it
- public Registration ValidateUser(string userName, string passWord)
- {
- try
- {
- using (var _context = new DatabaseContext())
- {
- var validate = (from user in _context.Registration
- where user.Username == userName && user.Password == passWord
- select user).SingleOrDefault();
- var users=_context.Registration;
- return validate;
- }
- }
- catch (Exception)
- {
- throw;
- }
- }
- public DbSet
Registration { get; set; }
and in db i have Registration table with records
Mark TaborPosted May 1, 2019, 8:02 AM
Mark TaborPosted May 1, 2019, 7:59 AM
Manoj BhoirPosted May 1, 2019, 7:07 AM