Exemplo n.º 1
0
        public async Task <bool> EditLeafAsync(EditLeafModel model)
        {
            var leaf = await _context.Leaves.SingleOrDefaultAsync(x => x.LeafId == model.LeafId);

            leaf.Name = model.Name;

            await _context.SaveChangesAsync();

            return(true);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> EditLeaf([FromBody] EditLeafModel model)
        {
            var response = await _leafService.EditLeafAsync(model);

            return(Ok());
        }