Open hankovich opened 2 years ago
I'm on board with the interface as an optional extra (though I think you could do this now relatively easily?) but I'm not sure about the extra project 🤔 If you need the interface to be in a separate project from the IDs then I think your best bet is to write those yourselves, and then just add them to your ID definitions e.g.
[StronglyTypedId]
public partial struct MyId : IId<MyId , Guid> {}
I suggest to add an additional project (
StronglyTypedId.Interfaces
) withand probably with
IId
interfaces will drammatically help us to minimize boilerplate code:IId
in place it will be possible to enumerate all ids via reflection.We store ids in separate libraries with contracts and we do not to pollute ids with additional attributes or add swagger/dapper packages to contract libraries.