public static Task <TReturn> InvokeGenericMethod <TReturn>(this DataRequest request, string methodName, IContextRepository contextRepository, IMapper mapper) => (Task <TReturn>)request .GetGenericMethod(methodName) .Invoke(null, new object[] { request, contextRepository, mapper });
public static Task <bool> InvokeGenericDeleteMethod(this DataRequest request, string methodName, IContextRepository contextRepository) => (Task <bool>)request .GetGenericMethod(methodName) .Invoke(null, new object[] { request, contextRepository });