示例#1
0
 public async Task <IActionResult> GetSocketId(int id)
 {
     try
     {
         _Logger.LogInfo(ControllerContext, $"Querying Socket with the id: {id}");
         return(Ok(await _ISocketRepository.GetSocketByIDAsync(id)));
     }
     catch (Exception ex)
     {
         _Logger.LogError(ControllerContext, $"Error Message: {ex.Message}");
         return(StatusCode(500, "Internal Server Error."));
     }
 }