//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Gets an error log model using the given oid. </summary> /// /// <remarks> Mustafa SAÇLI, 9.05.2019. </remarks> /// /// <param name="oid"> The oid to get. </param> /// /// <returns> An ErrorLogModel. </returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public ErrorLogModel Get(string oid) { var result = new ErrorLogModel { }; try { result = logBusiness.GetById(oid); } catch (Exception e) { SimpleFileLogger.Instance.LogError(e); } result = result ?? new ErrorLogModel { }; return(result); }
public IHttpActionResult Get(string oid) { var result = new ErrorLogModel { }; try { result = logBusiness.GetById(oid); } catch (Exception e) { this.Logger?.LogError(e); } result = result ?? new ErrorLogModel { }; return(Ok(result)); }