I'm just digging into fluent nhibernate and nhibernate.linq, and I'm running
into issues.
I'm using NHibernate 2.0.1.4000, NHibernate.Linq 1.0, and FluentNhibernate
(trunk).

All of these projects seem to be referencing 2.0.1.4000 of Nhibernate, so I
figured I was good.

I have a single model (for now), mapped with the Automapper in fluent-nhib.

Project
   -Id
   -Name
   -Code

when I execute a simple linq query, like this:

from Project p in Session.Linq<Project>() select p;

it results in.....

*The method Cast is not implemented.*  * Description: *An unhandled
exception occurred during the execution of the current web request. Please
review the stack trace for more information about the error and where it
originated in the code.

* Exception Details: *System.NotImplementedException: The method Cast is not
implemented.

*Source Error:*

  Line 24:         {
Line 25:             Logger.Info("Trying to execute linq query");Line
26:             return (from Project p in Session.Linq<Project>()
Line 27:                     select p).ToList();



*Stack Trace:*

  [NotImplementedException: The method Cast is not implemented.]
   NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression
expr) +794
   NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) +341
   NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression
exp) +204
   NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression
expr) +40
   NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) +341
   NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression
exp) +204
   NHibernate.Linq.Visitors.RootVisitor.VisitMethodCall(MethodCallExpression
expr) +40
   NHibernate.Linq.Visitors.ExpressionVisitor.Visit(Expression exp) +341
   NHibernate.Linq.Visitors.NHibernateExpressionVisitor.Visit(Expression
exp) +204
   NHibernate.Linq.Visitors.NHibernateQueryTranslator.Translate(Expression
expression, QueryOptions queryOptions) +85
   NHibernate.Linq.NHibernateQueryProvider.Execute(Expression expression) +216
   NHibernate.Linq.QueryProvider.System.Linq.IQueryProvider.Execute(Expression
expression) +29


Anybody know what I'm doing wrong?  I looked at AltOxite and they're running
these same versions, so I think it's something I'm doing wrong.

-Ben

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to