public async Task <HttpResponseMessage> SetNotificationListAsReaded( [ModelBinder(typeof(ArrayModelBinder))] int[] notificationId) { HttpResponseMessage responce; try { string receiverLogin = Thread.CurrentPrincipal.Identity.Name.FormatUserName(); foreach (var id in notificationId) { await _notificationDataService.SetNotificationAsReaded(id); } await NotificationsHub.SetNotificationAsReaded(receiverLogin, notificationId); responce = Request.CreateResponse(HttpStatusCode.OK); } catch (Exception ex) { _logger.Error($"NotificationController.SetNotificationListAsReaded", ex); responce = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex); } return(responce); }