// GET: Characteristics/Details/5 public async Task <ActionResult> Details(int id) { var categories = await _categoryManager.GetAll(); var characteristic = MapCharacteristic(await _characteristicManager.GetById(id), categories); return(View(characteristic)); }
public async Task <ActionResult <Characteristic> > Get(int id) { try { var characteristic = await _characteristicManager.GetById(id); return(Ok(characteristic)); } catch (Exception exception) { _logger.LogError($"Error occured during get characteristic. Exception: {exception.Message}"); return(BadRequest()); } }