Example #1
0
 public IEnumerable <FarmerInfo> Seek(string name, string fiscalCode)
 {
     return(DbUtil.ExecuteReader <FarmerInfo>(
                @"select top 5 * from farmerinfos where 
     (@name is null or name like @name+'%')
     and (@fiscalCode is null or fiscalCode = @fiscalCode)",
                new { name = name.Value(), fiscalCode = fiscalCode.Value() }, Cs));
 }