Jump to content

Need help with sqlite-net-pcl query


Recommended Posts



I'm developing a little desktop application in c# using sqlite-net-pcl NuGet package to manage a little sqlite database. Everything works well but I can't use a siple 'and' operator in the querys. I've tried this 2 ways:


conexion.Query<Participacion>($"select * from Participacion where idtorneo = {participacion.IDTorneo} and identrenador = {participacion.IDEntrenador}").FirstOrDefault();
conexion.Table<Participacion>().Where(c => c.IDTorneo == participacion.IDTorneo && c.IDEntrenador == participacion.IDEntrenador).FirstOrDefault();

They don't work, they always return the first data where c.IDTorneo ==participacion.IDTorneo, it doesn't matter if the c.IDEntrenador matches with the participacion.IDEntrenador or not. Can you help me?


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...