Hello,

I am new to ASP.net MVC and NopCommerce.

I am using nopCommerce primarily for the blog and forums and also for customer to fill out forms I am designing. These forms are like diaries which initially I intend only for the customer who completes them to view and edit them. In future they will be able to share them with other customers, possibly by selecting their usernames.

Am I ok using the CustomerGUID from nopCommerce like below?

In Controller
ViewBag.CustomerID = EngineContext.Current.Resolve<IWorkContext>().CurrentCustomer.CustomerGuid;


In 'Create' View
@Html.TextBoxFor(model => model.CustomerID, new { @class = "form-control", @Value = ViewBag.CustomerID, @style = "display: none;" })


The GUID is save in my table and used when the customer wants to view their records, to ensure the logged in user only sees their records.

Ideally I wanted to emulate the Vendors admin of their products, and how they can only view their own products but I couldn't figure that out.

Any help appreciated.