public ActionResult <ResponseContext> Update([FromQuery] string Id, [FromQuery] bool isRead) { try { if ((bool)HttpContext.Items["isLoggedInOtherDevice"]) { return(Ok(new ResponseContext { code = (int)Common.ResponseCode.IS_LOGGED_IN_ORTHER_DEVICE, message = Common.Message.IS_LOGGED_IN_ORTHER_DEVICE, data = null })); } var noti = new Notification(); noti = _notificationServices.FindOne(Id); noti.isRead = isRead; var result = _notificationServices.UpdateOne(noti); return(Ok(new ResponseContext { code = (int)Common.ResponseCode.SUCCESS, message = Common.Message.SUCCESS, data = result })); } catch (Exception ex) { _logger.LogError(ex, ex.Message); return(StatusCode(StatusCodes.Status500InternalServerError, new ResponseMessage { status = "ERROR", message = ex.Message })); } }