“/”应用程序中的服务器错误。

Parameter '@Id' must be defined.

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: MySql.Data.MySqlClient.MySqlException: Parameter '@Id' must be defined.

源错误:

执行当前 Web 请求期间生成了未经处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[MySqlException (0x80004005): Parameter '@Id' must be defined.]
   MySql.Data.MySqlClient.Statement.SerializeParameter(MySqlParameterCollection parameters, MySqlPacket packet, String parmName, Int32 parameterIndex) +336
   MySql.Data.MySqlClient.Statement.InternalBindParameters(String sql, MySqlParameterCollection parameters, MySqlPacket packet) +543
   MySql.Data.MySqlClient.Statement.BindParameters() +61
   MySql.Data.MySqlClient.PreparableStatement.Execute() +34
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1447

[MySqlException (0x80004005): Fatal error encountered during command execution.]
   Mammothcode.Public.Data.DapperEx.Update(DbBase dbs, T t, IDbTransaction transaction, SqlQuery sql, Nullable`1 commandTimeout) in F:\Gitlab\dema\src\Mammothcode.Public.Data\DapperEx.cs:265
   Mammothcode.BLL.BLLBase`1.Update(T entity, IDbTransaction transaction) in F:\Gitlab\dema\src\Mammothcode.Bll\Bll_Auto\BLLBase.cs:65
   Mammothcode.DeMa.web.Controllers.CmsController.ApplianceExampleDetails(String id, String roleId, String pathId) in F:\Gitlab\dema\src\Mammothcode.DeMa.web\Controllers\CmsController.cs:354
   lambda_method(Closure , ControllerBase , Object[] ) +240
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +280
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.Async.<>c__DisplayClass42.b__41() +33
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass39.b__33() +80
   System.Web.Mvc.Async.<>c__DisplayClass4f.b__49() +396
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass2a.b__20() +32
   System.Web.Mvc.Async.<>c__DisplayClass25.b__22(IAsyncResult asyncResult) +187
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c__DisplayClass1d.b__18(IAsyncResult asyncResult) +30
   System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +25
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38
   System.Web.Mvc.<>c__DisplayClass8.b__3(IAsyncResult asyncResult) +44
   System.Web.Mvc.Async.<>c__DisplayClass4.b__3(IAsyncResult ar) +25
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4110.0
XML 地图