Skip to content

Commit

Permalink
Use DateTime constructor instead of parsing string (Fix format except…
Browse files Browse the repository at this point in the history
…ion due to culture difference)
  • Loading branch information
seif committed Jul 19, 2011
1 parent dece64a commit 0b9ce99
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace SharpArchCookbook.Infrastructure.Queries
using System.Globalization;

namespace SharpArchCookbook.Infrastructure.Queries
{
using System;
using System.Collections.Generic;
Expand All @@ -16,7 +18,7 @@ public class ProductsForSaleQuery : NHibernateQuery<Product>, IProductsForSaleQu
public override IList<Product> ExecuteQuery()
{
return (from product in Session.Query<Product>()
where product.SellEndDate.Date > DateTime.Parse("5/30/2003")
where product.SellEndDate.Date > new DateTime(2003,5,30)
select product).ToList();
}
}
Expand Down

0 comments on commit 0b9ce99

Please sign in to comment.