public void Add(ViewCount viewCount)
{
var result = _viewCountLogic.Add(viewCount);
if (result != null && result.Error != null) throw new Exception(result.Error.Message);
var viewCounts = _viewCountLogic.Get(viewCount.PostId);
var viewCountUpdate = new ViewCountUpdate
{
PostId = viewCount.PostId,
ViewCounts = viewCounts,
ClientFunction = Constants.SocketClientFunctions.ViewCountUpdate.ToString()
};
_redisService.Publish(viewCountUpdate);
}
}