IStronglyTypedId<T> Interface
Provides strongly-typed access to the underlying value of a strongly-typed ID.
public interface IStronglyTypedId<T> : IStronglyTypedIdType parameters
T- The type of the underlying value.
Example
Accessing strongly-typed ID values with compile-time type safety:
[StronglyTypedId(typeof(Guid))]
public partial struct OrderId
{
}var guid = Guid.NewGuid();
var orderId = OrderId.FromGuid(guid);
IStronglyTypedId<Guid> typedId = orderId;
Guid value = typedId.Value; // Direct access to the typed value
Assert.Equal(guid, value);- Implements
Properties
| Name | Description |
|---|---|
| Value | Gets the strongly-typed underlying value. |
Value
Gets the strongly-typed underlying value.
T Value { get; }Property value
T