Example #1
0
        public async Task <bool> DeleteLeafAsync(DeleteLeafModel model)
        {
            var leaf = await _context.Leaves.SingleOrDefaultAsync(x => x.LeafId == model.LeafId);

            _context.Leaves.Remove(leaf);
            await _context.SaveChangesAsync();

            return(true);
        }
Example #2
0
        public async Task <IActionResult> DeleteLeaf([FromBody] DeleteLeafModel model)
        {
            var response = await _leafService.DeleteLeafAsync(model);

            return(Ok());
        }