示例#1
0
        public async Task <IViewComponentResult> InvokeAsync(HelperEntityType type)
        {
            var result = await _cacheManager.GetOrCreateStringAsync(GlobalConstants.HelperEntity + type,
                                                                    async() => (await _mediator.Send(new GetEntityQuery.Request {
                Type = type
            })).Value);

            return(View(model: result));
        }
示例#2
0
 public void RuleForType_WhenTypeIsInEnum_ShouldNotHaveValidationError(HelperEntityType type)
 {
     _validator.ShouldNotHaveValidationErrorFor(x => x.Type, type);
 }