Thanks, everyone for your help - that works.
I ended up having something like this in order to get products that aren't published when preview is enabled.
private readonly IHttpContextAccessor _contextAccessor;
public HomeController(IHttpContextAccessor contextAccessor)
{
_contextAccessor = contextAccessor;
}
public DocumentQuery<Product> GetHomeProducts()
{
var query = ProductsProvider.GetProducts()
.OnSite("SiteName")
.OrderBy("Title");
if (_contextAccessor.HttpContext.Kentico().Preview().Enabled)
{
query = query.Published(false);
return query;
}
return query;
}