0

Let's consider I have FruitAccessor with two methods: GetBananas and GetApples.

public abstract class FruitAccessor : DataAccessor
{
    [SprocName("GetAllBananas")]
    public abstract IEnumerable<Banan> GetBananas([ParamName("@MaxCount")] int count);

    public abstract IEnumerable<Apple> GetApples();
}

The default command timeout for both methods is 30 seconds. It's fine for GetBananas, but not enough for GetApples, so I want to increase it to 1 minute.

I can override OnInitCommand in DbManager but it will affect both methods.

It would be great to drop something like [CommandTimeout(60 * 60)] attribute on GetApples method, but unfortunately there is no such attribute.

So the question is how to achieve different timeouts for methods in the same DataAccessor?

altso
  • 2,311
  • 4
  • 26
  • 40

1 Answers1

0

You can request this feature here - https://github.com/igor-tkachev/bltoolkit/issues

IT.
  • 859
  • 4
  • 11