public IActionResult GetBySessionId(string sessionId) { try { return(Ok(_getSessionQueryHandler.GetResponse(new BySessionSentenceQuery() { SessionGuid = new Guid(sessionId) }))); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(StatusCode(500)); } }
public IActionResult GetById(int id) { try { _logger.LogWarning("IN GET BY ID!"); return(Ok(_getByIdQueryHandler.GetResponse(new ByIdSentenceQuery() { Id = id }))); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(StatusCode(500)); } }
public IActionResult GetAll() { return(Ok(_getAllQueryHandler.GetResponse(new AllSentencesQuery()))); }