it was fun creating it, but simply using Utc Dates should be enough (also avoiding abstracting, while maintaining all the convenient functionalities of dot nets date times)
EntityId throws an error for this simple code :
public Task<Recipe?> GetAsync(EntityId id, CancellationToken ct = default)
{
return _collection
// did not work, due to serialization
// Builders.Filter.Eq(x => x.Id, id)
.Find(x => x.Id == id)
.FirstOrDefaultAsync(ct) as Task<Recipe?>;
}
its really not worth the trouble digging into this, why the existing EntityIdSerializer wont work for this, as it is already working for reading and writing the data..
it was fun creating it, but simply using Utc Dates should be enough (also avoiding abstracting, while maintaining all the convenient functionalities of dot nets date times)
EntityId throws an error for this simple code :
public Task<Recipe?> GetAsync(EntityId id, CancellationToken ct = default) { return _collection // did not work, due to serialization // Builders.Filter.Eq(x => x.Id, id)
.Find(x => x.Id == id)
.FirstOrDefaultAsync(ct) as Task<Recipe?>;
}
its really not worth the trouble digging into this, why the existing EntityIdSerializer wont work for this, as it is already working for reading and writing the data..