tags:

views:

193

answers:

1

I have some configuration with open generics that looks like this:

  x.ForRequestedType(typeof(IRepository<>))
      .TheDefaultIsConcreteType(typeof(MyRepository<>));

I need to tell SM that it should NOT use the greediest constructor when building my repo. How do I do this?

Its easy enough when I'm using ForRequestedType<>, but it appears I can't do it with the non-generic version.

A: 

It's a little bit late reply, but you could try placing the [DefaultConstructor] attribute on the constructor you wish for default.

Razzie