C#C
C#2y ago
Mek

✅ Index Outside Of Bounds System.Data.SQLite

UserModel: https://pastebin.com/wJBdA30Y
LoginModel: https://pastebin.com/QYMHxMbT
LoginViewModel: https://pastebin.com/XdS6P11W
DatabaseEngine function in question: https://pastebin.com/ipgtkTLd

I keep getting the error in the screen shot from the funciton in question on the line where I execute
while (reader2.Read())
{
  // do some stuff
}
and I don't know why. I have tried moving them to two separate while loops, and two separate model variables like
UserModel newUser = new();
LoginModel userLogin = new();

while (reader.Read()) { // do something }
while (reader2.Read()) { // do something }

UserModel foundUser = newUser;
foundUser.UserLogin = userLogin;
and I still got the error. Thanks in advance
image.png
Was this page helpful?