I had add a new property to Customer and new column in dbo.Customer. I can write data to the new column during registration. But when I want to see list of all customers I get a grid with empty column of my new property. I found out that methode GetAllCustomers in CustomerService contains code:
var query = _customerRepository.Table;
Of course there is no my new column in this query.....
But I can't find how I can change this query.
The new attributes are saved in GenericAttribute Table.
//save customer attributes
_genericAttributeService.SaveAttribute(customer, SystemCustomerAttributeNames.CustomCustomerAttributes, customerAttributesXml);
You can Get them using:
But you receive an xml that you have to parse with
var selectedValues = _customerAttributeParser.ParseCustomerAttributeValues(selectedAttributesXml);
Thanks, but my question was how to add one more column to a query. I can not find a code which generates this query.
It was already done! But I still get empty column in my view of all customers in admin mode.
My new property in Customer Entity is ClientNumber. The column ClientNumber in dbo.Customer is not empty.
I have add to the script in List.cshtml after <div id="customers-grid"></div>:
But I still get no data in my new column in the view.
What do I miss?