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 13:   <b><a href='<%: Url.Action("Index", "CTFALeagues") %>'>CTFA Leagues</a></b> »
Line 14:                                                        <%Html.RenderPartial("LiglerUstTaraf", ViewData.Model); %>
Line 15:                                                         <% var sezon = ViewData.Model.Fikstur.Max(o => o.SEZON_NO);
Line 16:                                                            {%>
Line 17:                                                         <b><i><%:ViewData.Model.Fikstur.Where(o => o.SEZON_NO == sezon).Max(o=> o.SEZONLAR.SEZON_ADI) + " Season Fixture and Standings"%></i></b>

Source File: c:\KTFF\Views\CTFALeagues\fixtureandpointtables.aspx    Line: 15

Stack Trace:


[InvalidOperationException: Sequence contains no elements]
   System.Linq.Enumerable.Max(IEnumerable`1 source) +210
   ASP.views_ctfaleagues_fixtureandpointtables_aspx.__RenderContent2(HtmlTextWriter __w, Control parameterContainer) in c:\KTFF\Views\CTFALeagues\fixtureandpointtables.aspx:15
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +117
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +79
   ASP.views_shared_liglereng_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_liglereng.master.639c3968.4wqf7ko3.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