Stored Procedure with SimpleRepository
-
15-09-2020 - |
Question
How to I execute a Stored Procedure with SimpleRepository and get a Typed List as a answer? I'm using SubSonic 3.
Thanks.
Solution
Found my answer:
StoredProcedure sproc = new StoredProcedure("SprocName", ProviderFactory.GetProvider(ConnectionStringName));
string input= "input text";
sproc.Command.AddParameter("input", input, DbType.String);
return sproc.ExecuteTypedList<T>();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow