Trying to get Products from Sitefinity but getting a "Object reference not set to an instance of an object" error. The code looks like this;
public IList<Product> GetProducts()
var catalogManager = CatalogManager.GetManager();
List<Product> products = catalogManager.GetProducts().ToList();
Sorry for delay, been on vacation.
Error does not happen when the object is referenced from a controller, it was only happening when I was unit testing the repository separately using Nunit. I am now calling the methods in the controller for testing and that appears to be working OK.