public static async Task <Tuple <Users, string> > ValidateCredentials(TestAppEntities ctx, string Email, string Password) { try { string message = String.Empty; var user_found = await Users.GetItem(ctx, Email); if (user_found != null) { if (user_found.is_active == true) { if (user_found.password == Password) { } else { message = "Email or password incorrect."; } } else { message = "User inactive."; } } else { message = "Email or password incorrect."; } return(Tuple.Create(user_found, message)); } catch (Exception ex) { throw ex; } }
public UsersController(TestAppEntities ctx) { _ctx = ctx; }
public CustomFilesController(TestAppEntities ctx, IWebHostEnvironment hostingEnvironment) { _ctx = ctx; _hostingEnvironment = hostingEnvironment; }
public SessionController(TestAppEntities ctx) { _ctx = ctx; }
public Cars_MarioController(TestAppEntities context) { _context = context; }
public PersonsController(TestAppEntities ctx) { _ctx = ctx; }