public async Task <IActionResult> Get(string id) { var result = await _factoryService.GetAsync(id); if (result == null) { return(NotFound()); } return(Ok(result)); }
async Task <bool> IsFactoryNotExist(string factoryId) => await _factoryService.GetAsync(factoryId) == null;