Permalink
Browse files

Fixed bug in the inmemory saga persister where saga data with the sam…

…e property would causea invalid cast exception Closes #19
  • Loading branch information...
1 parent 149188a commit 60d9684f39ecda3dc0df9ede1c236ebfc3d9050d andreasohlund committed Jun 17, 2011
@@ -1,4 +1,5 @@
using System;
+using System.Linq;
using System.Collections.Generic;
using NServiceBus.Saga;
@@ -16,7 +17,7 @@ void ISagaPersister.Complete(ISagaEntity saga)
T ISagaPersister.Get<T>(string property, object value)
{
- foreach(var entity in data.Values)
+ foreach(var entity in data.Values.Where(x=>x.GetType() is T))
{
var prop = entity.GetType().GetProperty(property);
if (prop != null)

0 comments on commit 60d9684

Please sign in to comment.