public async Task <IActionResult> GetBrandById([FromRoute] string name) { try { Brand brand = await _service.FindBrandByName(name); if (brand == null) { return(NotFound()); } return(Ok(brand)); } catch (Exception e) { return(StatusCode(500, e)); } }
public async Task <IActionResult> GetBrandById([FromRoute] string name) { try { Brand brand = await _service.FindBrandByName(name); if (brand == null) { return(NotFound()); } return(Ok(brand)); } catch (Exception e) { return(StatusCode(500, e)); } }