Here is a simple class:
public class Person
{
public int Id {get; set;}
public string Name {get; set;}
}
When I save this in RavenDB, it gets some Id asseded, say 1, then this
var person = session.Load<Person>("Person/1")
returns the person specified by me, but this
var person = session.Query<Person>().First(p => p.Id == 1)
errors and says that "the sequence contains no elements." I do not understand why.
source
share