public static InMemorySagaRepository <TSaga> SetupSagaRepository <TSaga>(this IObjectBuilder builder) where TSaga : class, ISaga { var repository = new InMemorySagaRepository <TSaga>(); builder.Add <ISagaRepository <TSaga> >(repository); return(repository); }