Beispiel #1
0
        public async Task <ActionResult> Form(string name)
        {
            var optionType = _options.Value.Options.FirstOrDefault(x => x.Name == name.ToLower());

            if (optionType == null)
            {
                throw new Exception("option not found");
            }

            return(Ok(await _formBuilder.FromModel(optionType.Type)));
        }
Beispiel #2
0
 protected BaseModelValidatorTest(ITestOutputHelper output, KWebAppFactory <TStartup> factory) : base(output, factory)
 {
     FormBuilder = GetService <IFormBuilder>();
     Form        = FormBuilder.FromModel <TModel>().Result as LinearLayoutComponent;
 }