public async Task <NodeItem> Get(string scripletId, int id) { var data = await _service.GetAsync(scripletId); if (data == null) { return(null); } var scriplet = _mapper.Map <Scriplet>(data); NodeItem nodeItem; if (scriplet.Items.TryGetValue(id, out nodeItem)) { return(nodeItem); } return(null); }
public async Task <Scriplet> Get(string id) { var data = await _service.GetAsync(id); if (data != null) { return(_mapper.Map <Scriplet>(data)); } else { return(null); } }