Example Question:
**Title:** How can I publish an item programatically?
**Body:**
I have a custom import job that takes data from a CSV file and imports them into an Item Bucket.
When the job ends, I need to publish all the items that have been created.
What I have so far:
Here is the code that I use to import:
public class CsvImport()
{
public void Process(string csvPath)
{
var data = ReadCsvFile(csvPath);
var importedItems = new List<Item>();
foreach(var row in data)
{
var newItem = ImportRow(row);
}
// TODO: Publish those items that are imported:
}
private List<IRow> ReadCsvFile(string csvPath)
{
//....
}
private List<Item> ImportItem(IRow row)
{
//....
}
}
What is the best option here? Should I use PublishManager
or another method?