I have a query that I run against the database, and I can see that there is a record for 31/05/2013. When I run this query from C# with ADO.NET, and then use the following
I think that you are missing record in first example because you move reader by one and then cast it.
Try this change and see if it worked:
var timeSeries = new List();
using (var reader = cmd.ExecuteReader())
{
if (reader.HasRows)
{
timeSeries = reader.Cast()
.Select(r => new TimeSeries
{
MidRate = (double)r["MidRate"],
RiskFactorName = (string)r["RiskFactorName"],
SeriesDate = (DateTime)r["SeriesDate"]
}).ToList();
}
}