standard GUID

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 6 ans
Dear Experts,

1) what is the standard way of nopCommerce to generate GUID for every User, registered or unregistered?

2) is it generated through sql server or generated from the client side?

3) where in the source code it generates the GUID for every customer?


Regards,


Archie
Il y a 6 ans
archie748491 wrote:
Dear Experts,

1) what is the standard way of nopCommerce to generate GUID for every User, registered or unregistered?

2) is it generated through sql server or generated from the client side?

3) where in the source code it generates the GUID for every customer?


Regards,


Archie


in v3.90, two places (maybe more)

1. in ctor of Nop.Core.Domain.Customes.Customer
2. in Nop.Admin.Controllers.CustomerController.Create()
Il y a 6 ans
1) Standard way of GUID generation is at server side: Guid.NewGuid().

2) It is neither generating in SQL, nor at client side.

3) Source Code : CustomerService --> InsertGuestCustomer

      
 var customer = new Customer
            {
               CustomerGuid = Guid.NewGuid(),
                Active = true,
                CreatedOnUtc = DateTime.UtcNow,
                LastActivityDateUtc = DateTime.UtcNow,
            };



A. When user clicks Register for the first time, new GUID is created in Table "Customer" but values entered is NULL corresponding to this entry.

B. Once users fill info on registration page and clicks "Register", data is updated by calling CustomerService-->UpdateCustomer method with GUID generated in step A.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.