Open leevva opened 7 years ago
Yes, that does seem to be an issue. I don't think there is a way to force the type system to infer the correct argument type with that syntax. However, you can pass a strongly typed delegate (either an existing method, or a lambda). So, this is a little cleaner, especially if you have a sproc that returns a value:
string output = null;
StoredProcedure.Create("dbo", "MyStoredProc")
.WithOutputParameter("Name", new Action<string>(s => output = s));
Documented syntax doesn't work:
This way it works: