Exemplo n.º 1
0
        public async Task <IActionResult> Edit(Guid?id)
        {
            if (id != null)
            {
                var test = await testRepository.FirstOrDefaultAsync(x => x.Id == id);

                return(View(new TestModel(test)));
            }

            return(View(ModelGenerator.GenerateTestModel()));
        }