Stored Procedure with SimpleRepository

93 Views Asked by At

How to I execute a Stored Procedure with SimpleRepository and get a Typed List as a answer? I'm using SubSonic 3.

Thanks.

1

There are 1 best solutions below

1
Andreas On BEST ANSWER

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>();