Server Error in '/' Application.

Non-static method requires a target.

Description: An unhandled exception occurred.

Exception Details: System.Reflection.TargetException: Non-static method requires a target.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[TargetException: Non-static method requires a target.]
   System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target) +14498232
   System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +163
   System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +98
   System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) +35
   System.Data.Objects.ELinq.QueryParameterExpression.TryGetFieldOrPropertyValue(MemberExpression me, Object instance, Object& memberValue) +245
   System.Data.Objects.ELinq.QueryParameterExpression.TryEvaluatePath(Expression expression, ConstantExpression& constantExpression) +394
   System.Data.Objects.ELinq.QueryParameterExpression.EvaluateParameter(Object[] arguments) +127
   System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +1586
   System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +215
   System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +40
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +220
   Bahlsen.Web.Leibniz.Areas.BahlsenRelaunch.Controllers.ProductController.Product() in D:\a\1\s\Bahlsen.Web.Leibniz\Areas\BahlsenRelaunch\Controllers\ProductController.cs:16
   lambda_method(Closure , ControllerBase , Object[] ) +87
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.<>c__DisplayClass24_0.<InvokeActionMethodWithFilters>b__0() +80
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +466
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +466
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +524


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0