RobinMeow / CommunityCookbook

CommunityCookbook
MIT License
0 stars 0 forks source link

Rethink EntityId and IsoDateTime Design #122

Closed RobinMeow closed 5 months ago

RobinMeow commented 5 months ago

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..