I'm looking for an example of how to use a custom class as an identifier with RavenDB .NET client. I have something like this:
class Product
{
public ProductId Id { get; }
public Product()
{
Id = new ProductId(Guid.NewGuid());
}
// ...
}
where ProductId looks like this:
class ProductId
{
public Guid Value { get; }
public ProductId(Guid value)
{
// validation
Value = value
}
}
I haven't found any information on that topic in the documentation. Does anyone know to do that?