public async Task <int> CountAllAsync(Guid identityWorkId, Guid instanceId) { var middlewareManager = new MiddlewareManager <T>(new BaseRecordManager <T>(), Validator); int lstReturn = await middlewareManager.CountAllAsync(identityWorkId, instanceId); return(lstReturn); }