You can find at this subversion repository ( http://nablasoft.googlecode.com/svn/trunk/Castle/TestIOC ) a simple project that contains a custom lifecycle that bound the lifecycle of objects to a  context. This lifecycle was created to address the problem of disposing inner object, you can find the deails here. This new version support both singleton and transient objects, this [...]

Continue reading about Again and again on Castle and lifecycle.

Previous part: Part1, Part2, Part3. One of the most important feature of the microsoft ExpressionVisitor I’ve told you before is the ability to substitute expression. Let’s for example see how the VisitBinary is implemented. 1 protected virtual Expression VisitBinary(BinaryExpression b) 2 { 3 Expression left = this.Visit(b.Left); 4 Expression right = this.Visit(b.Right); 5 Expression conversion [...]

Continue reading about Subtree substitution, thanks to microsoft ExpressionVisitor

Previous part: Part1, Part2, Part3. One of the most important feature of the microsoft ExpressionVisitor I’ve told you before is the ability to substitute expression. Let’s for example see how the VisitBinary is implemented. 1 protected virtual Expression VisitBinary(BinaryExpression b) 2 { 3 Expression left = this.Visit(b.Left); 4 Expression right = this.Visit(b.Right); 5 Expression conversion [...]

Continue reading about Subtree substitution, thanks to microsoft ExpressionVisitor

IQueryable
on March 4th, 2008
On category: Uncategorized

Implementing IQueryable is not a joke, here there is an excellent tutorial. I’m actually playing on Linq2Nhibernate by ayende and I realize that traversing an Expression Tree is not so painful, but surely complicated. Alk.

Continue reading about IQueryable

Linq to Sql is beautiful, but for people using NHibernate sometimes there are surprises. Suppose you load an entity, then you keep a reference in memory, dispose the original DataContext, and after some time you want to propagate to the database the value of the modified entity. In NHibernate this is simple as calling SaveOrUpdate() [...]

Continue reading about Linq to Sql,working with detached object ……..