Ejemplo n.º 1
0
        public async Task <TestModel> ImportAsync(TestModel model, [FromServices] IDistributedConfigruation distributed)
        {
            var response = await distributed.TryImportAsync("Test", model);

            if (response)
            {
                return(model);
            }

            throw new Exception("Fail");
        }
Ejemplo n.º 2
0
        public async Task <bool> DeleteAsync([FromForm] string key, [FromServices] IDistributedConfigruation distributed)
        {
            var response = await distributed.TryDeleteAsync(key);

            return(response);
        }