Server Error in '/' Application.

Cannot convert null to 'int' because it is a non-nullable value type

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot convert null to 'int' because it is a non-nullable value type

Source Error:


Line 53:         isFull = Convert.ToInt32(item.IsFull); 
Line 54:         isFullBowl = Convert.ToInt32(item.IsFullBowl);      
Line 55:         spacesAvailable = item.SpacesAvailable;
Line 56:     }
Line 57: 

Source File: d:\hostingspaces\benbrook\putneycricketclub.com\wwwroot\nets\default.cshtml    Line: 55

Stack Trace:


[RuntimeBinderException: Cannot convert null to 'int' because it is a non-nullable value type]
   CallSite.Target(Closure , CallSite , Object ) +115
   System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +658
   CallSite.Target(Closure , CallSite , Object ) +128
   ASP._Page_nets_default_cshtml.Execute() in d:\hostingspaces\benbrook\putneycricketclub.com\wwwroot\nets\default.cshtml:55
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +199
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +73
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +154
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +80
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +119


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