Tighter type constraint
Hello.
Let's say I have the following
and then maybe I have concrete like:
I can do the following now for type-safety, i.e., that to get
However, this makes for quite a verbose API, is it possible somehow to constrain this so it is possible that
Let's say I have the following
and then maybe I have concrete like:
I can do the following now for type-safety, i.e., that to get
Order you must provide an OrderId and you can't mistakenly provide the wrong strongly typed ID:However, this makes for quite a verbose API, is it possible somehow to constrain this so it is possible that
LoadAggregate<Order>(orderId) is only valid if orderId is an OrderId and not say ProductId?