Hi,
The nop designed how to filter the search engine by judge the useragent, but this can't not filter all crawlers 100 percent, so nop generate thousands of guest customers and those custmors deleted by Delete guests task. This is wasted a lot of CustomerIds in result. So I want to design a function to reused the wasted CustomerIds which the delete guest task deleted.
First, now that Detete guests task can know which customers to deleted, so we can known which CustomerIds can be resused. Because I just need the customerid field in customer table, so I let task delete the guest customer in customer table, then I store the customerid into a my new table DeletedGuestCustomer which just have one field named Id as premary key and IsUsed as bool to judge this customerid can be used or not.
Second, when a new customer registered, I will get the min customerid from DeletedGuestCustomer and judge whether this customerid is in Customer Table or not, if not, it means that I can use this customerId as a new customer's id, if yes, delete this customerid in DeletedGuestCustomer table and get next one.
Now my problem is how to used repository's insert function to insert a new customer with a customerid, as the Customer table's Id field is auto-increment and the identity seed is bigger than this customerid now.
Anyone can help, thank you.
Alex