Making c# lambda expressions more readable

How often do you use lambda expressions? I use them a great deal, mostly when I am making method assertions in Rhino Mocks. Their use is also on the rise with the popularity of fluent interfaces growing. If you do … Continue reading 

Posted in C#, Lambda Expressions, Rhino Mocks, Unit Test | 10 Comments

Presenter Logic || Domain Service Logic || Repository Logic?

Obviously the answer to the titular question is yes. I have recently found myself questioning whether the logic I am coding belongs in a domain service or in the presenter. I actually found the same logic in the presenter residing … Continue reading 

Posted in C#, Domain Driven Design, Domain Service, Presenter, Repository, View | 3 Comments

test code snippet

protected virtual ICriterion WhereInactiveDateIsNull{ get { return Restrictions.IsNull(“InactiveDate”); }}protected virtual IList<Entity> GetAllItems(params ICriterion[] criterion){ ICriteria getCriteria = Session.CreateCriteria(typeof(Entity)); if (criterion != null) { foreach (var criteria in criterion) { getCriteria.Add(criteria); } } return getCriteria.List<Entity>();}public virtual IList<Entity> GetAll(){ return GetAllItems();}public virtual … Continue reading 

Posted in Uncategorized | Leave a comment

Entity Validation Ideation

Issue at Hand: I have been recently sumo wrestling with the idea of entity validation in my mind. So far, the validation problem, which is like, E. Honda, has the advantage over my mind which is currently like, Chun Li. … Continue reading 

Posted in Domain Driven Design, Entity Validation | 7 Comments