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); }
public async Task <IActionResult> EditLeaf([FromBody] EditLeafModel model) { var response = await _leafService.EditLeafAsync(model); return(Ok()); }