Base solution for your next web application
Open Closed

Entity with Guid as unique property #2805


User avatar
0
bilalhaidar created

Hello, I need a way to generate around 3000 GUIDs so that the user of my app would generate some QR Codes based on those GUIDS. Then later, I can import some data coming from an Excel sheet, each record with a GUID that was generated before and mapped to a QR Code.

So in my case, I need to have primary key for an entity as Int while adding a property of type Guid (Coming from backlog of records and later on when new records are created through the system).

Does the Abp Framework support this scenario? Does it offer any tools for GUID generation with uniqueness, etc.

If not, what's the alternative for my case? I appreciate if you can help.

Thanks


2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    ABP has this class <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp/SequentialGuidGenerator.cs">https://github.com/aspnetboilerplate/as ... nerator.cs</a>, you can use it to generate guids.

  • User Avatar
    0
    bilalhaidar created

    Thanks. I will use that.