Context: For my next toy project, I'll use UUID as record primary key. Right now I'm wondering if I should generate said UUIDs in the service layer (before it goes to the database) or in the repository layer (straight on top of the database).
@juliobiason both are fine. It's even fine to generate them client-side. Generating them independantly from the database also means you don't have to do a round-trip to get the ID of the entry you just generated