I need the Index method of my blockcontroller to be async but since the base class already has a Index method that is sync this seems impossible. Anyone an idea how to fix this?
The end result I'm looking for will be something like this:
public class MyAsyncBlockController : BlockController
public async Task Index(MyAsyncBlock currentBlock)
// async code
Not 100% but I think you need to wait for future Epi versions to be able to do that.
Did you solve this?
I'm stuck with the same problem :s
Nope, I guess we have to (a)wait ;)
I solved this issue by creating a new base controller to be used instead of BlockController:
public abstract class AsyncBlockController<TContentData> : ActionControllerBase, IRenderTemplate<TContentData>
where TContentData : IContentData
public abstract Task<ActionResult> Index(TContentData currentContent);