well now i feel dumb and bad. first off, i wasnt able to get your
example to compile, but it was probably more due to my lack of
knowledge around sqlite than anything. so i decided to write another
unit test of my own that basically looks like this:
Dim flRepos As New Repository(session)
Dim id As Integer = 1
Dim product = flRepos.Query(Of Product)(Function(p As Product)
p.Id = id).FirstOrDefault()
Assert.AreEqual(id, product.Id)
and it passed. so the problem doesnt look like its in fluent
nhibernate from that stand point. But if you look up at my original
question, you'll see that I'm trying to wrap the fluent nhibernate
repository in my own generic repository. When I then call the GetById
method, which I believe does the same thing as what I have in the code
in this message, I get an exception trying to cast Int to Product.
Does that make sense?