public List <Animal> GetAnimals(string animalName) { using (IDbConnection connection = new System.Data.SqlClient.SqlConnection(DbConnect.ConVal("HumaneSocietyDB"))) { var output = connection.Query <Animal>($"select * from Animal where AnimalName = '{animalName}'").ToList(); //var output = connection.Query<Animal>("dbo.Animal_GetAnimalByName @AnimalName", new { AnimalName = animalName }).ToList(); // above using stored procedure return(output); } }