var shows = (from sh in ctx.Seasons select sh ).ToList();
leads to the errror below. Filling the enddate an publishing solves the problem but this would mean that all dates would need to be mandatory . Hope this is enough info ;-) Regards Teus
Server Error in '/' Application.
String was not recognized as a valid DateTime.
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.FormatException: String
was not recognized as a valid DateTime.
Source Error:
Line 17: ctx = new MyUmbracoDataContext(); Line 18: Line 19: var seasons = (from sh in ctx.Seasons Line 20: select sh ).ToList(); Line 21: RPshows.DataSource = shows;
Empty datetime bug in Linq to Umbraco 4.5
Problem : Empty datetime property makes it unable to load the instances with Linq
Example:Season has a empty EndDate
Then running the code
leads to the errror below. Filling the enddate an publishing solves the problem but this would mean that all dates would need to be mandatory . Hope this is enough info ;-) Regards Teus
Server Error in '/' Application.
String was not recognized as a valid DateTime.
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.FormatException: String was not recognized as a valid DateTime.
Source Error:
Source File: C:\SVN_WORK\StadsschouwburgVelsen_2010Website\Solution\BO.Velsen.Umbraco\usercontrols\HomePageShowViewer.ascx.cs Line: 19
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Can you log this on codeplex as a bug
Logged on codeplex : http://umbraco.codeplex.com/workitem/28576
I'm working on a resolution for this, see this thread: http://our.umbraco.org/forum/core/41-feedback/11237-LINQ-to-Umbraco-optional-structs
is working on a reply...