Ogni volta che provo ad aggiungere / aggiornare il modello da DB, questo errore viene sempre generato, qualcuno può aiutarmi con questo?
Impossibile generare il modello a causa della seguente eccezione: 'System.Data.Entity.Core.EntityCommandExecutionException: si è verificato un errore durante l'esecuzione della definizione del comando. Vedi l'eccezione interna per i dettagli. ---> System.Data.SqlClient.SqlException: la richiesta in entrata ha troppi parametri. Il server supporta un massimo di 2100 parametri. Ridurre il numero di parametri e inviare di nuovo la richiesta. at System.Data.SqlClient.SqlConnection.OnError (eccezione SqlException, booleano breakConnection, Azione
1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action
1 wrapCloseInAction) su System.Data.SqlClient.TdsParser .ThrowExceptionAndWarning a System.Data.SqlClient.SqlDataReader (stateObj TdsParserStateObject, booleano callerHasConnectionLock, booleano asyncClose) a System.Data.SqlClient.TdsParser.TryRun (runBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader datastream, bulkCopyHandler BulkCopySimpleResultSet, stateObj TdsParserStateObject, booleano e dataReady). TryConsumeMetaData () su System.Data.SqlClient.SqlDataReader.get_MetaData () su System.Data.SqlClient.SqlCommand.FinishExecuteReader (SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) su System.Data.SqlClient.SqlCommand.RunExecuteReaderTds (CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task & task, Booleano asyncWrite, SqlDataReader ds) su System.Data.SqlClient.SqlCommand.RunExecuteReader (CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
1 c) a System.Data.Entity.Infrastructure.Interception.InternalDispatcher
at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.<Reader>b__c(DbCommand t, DbCommandInterceptionContext1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func
Operazione1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func
3, TInterceptionContext interceptionContext, Azione3 executing, Action
3 eseguita) su System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader (comando DbCommand, DbCommandInterceptionContext interceptionContext) su System.Data.Entity.Internal.InterceptableDbCommand.ExecuteDbDataReader ( Comportamento Comportamento) a System.Data.Common.DbCommand.ExecuteReader (Comportamento Comportamento)
a System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands (EntityCommand entityCommand, Comando Comportamento comportamento) --- Fine dell'eccezione interna
Questo tipo di errore è solitamente causato da molti oggetti in un modello (sembra che questo sia il caso di tutte le tue procedure) e Entity Framework non è abbastanza intelligente da rendere il round trip più database.
È possibile trovare ulteriori informazioni su questo problema: https://social.msdn.microsoft.com/Forums/en-US/aafb63c4-61df-4d8d-9373-df78d6f7d686/entity-framework-vs-2012-designer-fails-calling -spexecutesql-con-troppo-molti-parametri-quando-aggiornamento? forum = adodotnetentityframework