asp.net mvc 5 - Error occured while Entity Framework generating model -


  • i'm having few tables in edmx (not more 20)
  • i'm having big list of stored procedures (may more 1k) in edmx.
  • ef version 5.0

whenever try add/update model db throw error, can 1 me out this?

unable generate model because of following exception: 'system.data.entity.core.entitycommandexecutionexception: error occurred while executing command definition. see inner exception details. ---> system.data.sqlclient.sqlexception: incoming request has many parameters. server supports maximum of 2100 parameters. reduce number of parameters , resend request. @ system.data.sqlclient.sqlconnection.onerror(sqlexception exception, boolean breakconnection, action1 wrapcloseinaction) @ system.data.sqlclient.sqlinternalconnection.onerror(sqlexception exception, boolean breakconnection, action1 wrapcloseinaction) @ system.data.sqlclient.tdsparser.throwexceptionandwarning(tdsparserstateobject stateobj, boolean callerhasconnectionlock, boolean asyncclose) @ system.data.sqlclient.tdsparser.tryrun(runbehavior runbehavior, sqlcommand cmdhandler, sqldatareader datastream, bulkcopysimpleresultset bulkcopyhandler, tdsparserstateobject stateobj, boolean& dataready) @ system.data.sqlclient.sqldatareader.tryconsumemetadata() @ system.data.sqlclient.sqldatareader.get_metadata() @ system.data.sqlclient.sqlcommand.finishexecutereader(sqldatareader ds, runbehavior runbehavior, string resetoptionsstring) @ system.data.sqlclient.sqlcommand.runexecutereadertds(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, boolean async, int32 timeout, task& task, boolean asyncwrite, sqldatareader ds) @ system.data.sqlclient.sqlcommand.runexecutereader(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, string method, taskcompletionsource1 completion, int32 timeout, task& task, boolean asyncwrite) @ system.data.sqlclient.sqlcommand.runexecutereader(commandbehavior cmdbehavior, runbehavior runbehavior, boolean returnstream, string method) @ system.data.sqlclient.sqlcommand.executereader(commandbehavior behavior, string method) @ system.data.sqlclient.sqlcommand.executedbdatareader(commandbehavior behavior) @ system.data.common.dbcommand.executereader(commandbehavior behavior)
@ system.data.entity.infrastructure.interception.dbcommanddispatcher.<reader>b__c(dbcommand t, dbcommandinterceptioncontext
1 c) @ system.data.entity.infrastructure.interception.internaldispatcher1.dispatch[ttarget,tinterceptioncontext,tresult](ttarget target, func3 operation, tinterceptioncontext interceptioncontext, action3 executing, action3 executed) @ system.data.entity.infrastructure.interception.dbcommanddispatcher.reader(dbcommand command, dbcommandinterceptioncontext interceptioncontext) @ system.data.entity.internal.interceptabledbcommand.executedbdatareader(commandbehavior behavior) @ system.data.common.dbcommand.executereader(commandbehavior behavior)
@ system.data.entity.core.entityclient.internal.entitycommanddefinition.executestorecommands(entitycommand entitycommand, commandbehavior behavior) --- end of inner exception

this kind of error caused many object in model (look case procedures) , entity framework not smart enough make multiple database round trip.

you can find more information issue: https://social.msdn.microsoft.com/forums/en-us/aafb63c4-61df-4d8d-9373-df78d6f7d686/entity-framework-vs-2012-designer-fails-calling-spexecutesql-with-too-many-parameters-when-updating?forum=adodotnetentityframework


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -