Exemple #1
0
 public async Task <IActionResult> GetSocketByName(string Name)
 {
     try
     {
         _Logger.LogInfo(ControllerContext, $"Querying for the Socket with the name: {Name}");
         return(Ok(await _ISocketRepository.GetSocketByNameAsync(Name)));
     }
     catch (Exception ex)
     {
         _Logger.LogError(ControllerContext, $"Error Message: {ex.Message}");
         return(StatusCode(500, "Internal Server Error."));
     }
 }