protected new IActionResult Response(object result = null) { if (_notifications.HasNotifications()) { if (result == null && _notifications.HasCommandNotifications()) { return(Ok(new SuccessResponseDto <object>(_notifications .GetCommandNotifications() .FirstOrDefault() .Value) )); } if (result == null) { return(BadRequest(new ErrorResponseDto(Notifications.FirstOrDefault().Value.ToString()))); } } return(Ok(new SuccessResponseDto <object>(result))); }