Hello I am writing an application for bulk import and i want to use ProductService Class,
I created a database model for my database and my connection string works.

here is what i have done:

NopConfig.ConnectionString = ConfigurationManager.ConnectionStrings["NopEntities"].ConnectionString;
NopObjectContext context = new NopObjectContext(NopConfig.ConnectionString);

ProductService ps = new ProductService(context);


Product product = ps.GetProductById(prod.ProductId);

Eventhough I have this product in my db  it says Object reference not set to an instance of an object.

Any Help?