Quantcast
Channel: dbschemareader Discussions Rss Feed
Viewing all articles
Browse latest Browse all 166

New Post: Generate Store Procedure

$
0
0
You can write C# code for stored procedures by setting codeWriterSettings.WriteStoredProcedures = true

The generated stored procedures use raw ADO whatever the CodeTarget. It doesn't write Code First Database.SqlQuery<T>(parameters) type code - it uses raw ADO. When I use this style (or dapper), I use the generated xResult class (the output) and I copy the signature of the generated stored procedure Execute method (input). This saves the labor-intensive code.

Using stored procedures with the syntax DbSet.SqlQuery("x @p",z) works fine.

It doesn't support the EF 6 MapToStoredProcedures functionality, because recognizing the Insert/Update/Delete stored procedures would be a little complicated. If you follow the EF conventions, it's trivial to map manually.

Viewing all articles
Browse latest Browse all 166

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>