abe545 / CodeOnlyStoredProcedures

A library for easily calling Stored Procedures in .NET using only code (no xml or gui).
MIT License
4 stars 3 forks source link

New extension method WithTableValuedParameter with DataTable parameter #93

Closed leevva closed 7 years ago

leevva commented 7 years ago

Please add extension method which gets DataTable parameter such as:

        public static TSP WithTableValuedParameter<TSP>(this TSP sp,
            string            name,
            DataTable         table,
            string            tableTypeSchema,
            string            tableTypeName)
            where TSP : StoredProcedure

This parameter can be passed this way:

new SqlParameter(name, table)
    {
        SqlDbType = SqlDbType.Structured
    }
abe545 commented 7 years ago

Sure!

leevva commented 7 years ago

Will it be included in 2.4.0?

abe545 commented 7 years ago

That should be doable :)

leevva commented 7 years ago

Hi! What about 2.4.0? :wink:

leevva commented 7 years ago

Could you implement this method in prerelease?

abe545 commented 7 years ago

Hi @leevva , thanks for the nudge! I had actually largely done this already, but for some reason forgot to finish the work... I'll get a build/pre-release pushed out tonight. If I can rely on you to test it in the real world, we can get 2.4.0 pushed to stable soon...

leevva commented 7 years ago

Hi @abe545 , you're awesome! It works like a charm! Many thanks!