public async Task <bool> DeleteNodeAsync(DeleteNodeModel model) { var node = await _context.Nodes.SingleOrDefaultAsync(x => x.NodeId == model.NodeId); _context.Remove(node); await _context.SaveChangesAsync(); return(true); }
public async Task <IActionResult> DeleteNode([FromBody] DeleteNodeModel model) { var response = await _nodeService.DeleteNodeAsync(model); return(Ok()); }