problem in using Max or Min function

3 views
Skip to first unread message

Mostafa Anoosheh

unread,
Sep 17, 2011, 5:40:11 AM9/17/11
to NoRM mongodb
Hello,
I have a coolection with this structure
public class News
{
[MongoIdentifier]
public int NewsId { get; set; }
public string NewsUrl { get; set; }
public DateTime CreationDate { get; set; }
public string GroupName { get; set; }
public string Title { get; set; }
public string Description { get; set; }
}

and when I run this code
using (IMongo db = Mongo.Create(cnn))
{
IQueryable<News> news =
db.GetCollection<News>().AsQueryable();
var result = news.Max(p => p.CreationDate);
}
system generate a db assertion failure exception
I can't run any Max or Min function

Anyone has suggestion?
Reply all
Reply to author
Forward
0 new messages