West Wind Toolkit for .NET
Ambiguous Reference Error
Hi Rick,
I wanted to try the Find command without having to write inline sql or a stored procedure by just passing the value, table name, and field.
However, I am getting an ambiguous reference error for which I can't fix.
I have it working with a stored procedure, but as mentioned would be cool without it.
var ut = sql.Db.Find<Unit_TBL>("QueueMessageManager.dbo.GetUnitByID @0", tp.UnitID);
Any suggestions? Thanks, Craig
That's a bug...
Can you try explicitly naming the parameters?
Both of these work:
var customer = data.Find<Customer>(keyValue: 1, tableName: "Customers",keyField: "Id" );
customer = data.Find<Customer>(keyValue: "Strahl", tableName: "Customers",keyField: "LastName" );
+++ Rick ---