Server Error in '/' Application.

Sequence contains no elements

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: System.InvalidOperationException: Sequence contains no elements

Source Error:


Line 98: <asp:Content ID="Content5" ContentPlaceHolderID="Soltaraf" runat="server">
Line 99: 
Line 100:<% var x1 = ViewData.Model.Fikstur.Min(o=> o.LIG_NO);
Line 101:   if (x1 == 10)
Line 102:   {%>

Source File: c:\KTFF\Views\Cups\TopScorers.aspx    Line: 100

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.Min(IEnumerable`1 source) +210
   ASP.views_cups_topscorers_aspx.__RenderContent5(HtmlTextWriter __w, Control parameterContainer) in c:\KTFF\Views\Cups\TopScorers.aspx:100
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.views_shared_cups_master.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\b3a2dc25\1126e4f6\App_Web_cups.master.639c3968.ysjbp7gg.0.cs:0
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +250
   System.Web.Mvc.ViewPage.Render(HtmlTextWriter writer) +75
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8753


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