Khaikaa Posted December 9, 2018 Share Posted December 9, 2018 Hi, Â 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 More sharing options...
Khaikaa Posted December 17, 2018 Author Share Posted December 17, 2018 I just relized it was not a problem on the sql query but a mistake on another point of my code. Problem solved. Diefool 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now