Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

New Post: Too many arguments Delete stored procedure

$
0
0
I used the reference stored procedure from the documentation as a guide, but I'm getting a SqlException that "Procedure or function DeleteXXX has too many arguments specified." And indeed it has based on the Query Analyzer.

Here is what Query Analyzer has as the generated T-SQL:
exec DeleteXXX @key=3, @Version_Original=0x000...1774, @TypeKey=1,@RowsAffected=@p4 output select @p4

My stored procedure definition is
create procedure DeleteXXX
@key int
as ...

I'm only trying to map the key through the fluent API.

I can understand the @RowsAffected (although not shown in the documentation) and even the @Version_Original. But, why do I need a parameter for @TypeKey?

I'm very happy that I can map my entities to stored procedures now. But, I'd like a little more control on what gets set. For instance, I may not want to allow everything to be set at Insert or Update. I can enforce some of this at the business layer, but I'd rather enforce it at the database.

Viewing all articles
Browse latest Browse all 10318


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