I have this method:
public static IEnumerable<T> GetList(string where, Dictionary<string, object> parameters)
{
IEnumerable<T> entities;
using (var connection = OpenConnection())
{
entities = connection.GetList<T>(where, new DynamicParameters(parameters));
}
return entities;
}
And I call it like such:
string publicID = "463EC1EE-8AAB-4ABA-9B39-132BC8D3236E"
Dictionary<string, object> parameters = new Dictionary<string, object>();
parameters.Add("@APIPublicID", publicID);
var apiUsers = Repository<APIUsers>.GetList("WHERE APIPublicID = @APIPublicID", parameters).ToList();
The GetList()
method calls the SIMPLECrud .dll that is a wrapper over Dapper.
That works beautifully. But here's the really weird thing. If I add some extra letters or numbers on the end of the guid publicID
, it STILL works:
Instead of:
string publicID = "463EC1EE-8AAB-4ABA-9B39-132BC8D3236E"
I do...
string publicID = "463EC1EE-8AAB-4ABA-9B39-132BC8D3236EABCDEFG"
.... // rest of the method as before
I get the exact same results. If I make the guid shorter, or if I change characters inside of it, then it behaves as expected.
What am I doing wrong here?