Go to Comments





Using sql IN clause in dapper orm


Created: 27/06/2016 10:00:46 a.m.





Using sql IN clause in dapper orm

Example:


conn.Open();

int[] state = new  []{ 1, 0 };

clientes = conn.Query<Cliente>("SELECT * FROM tbl_clientes WHERE state in @state and tipo in @tipo", 
                    new{
                        state = state,
                    }).ToList();



Comments: