I hope somebody can help me. I'm using Ravendb with the Nodatime bundles, and so far I didn't have any problem with it until I wanted to use some nodatime methods during index creation.
Product:
public class Product {
public string Id { get; set; }
public LocalDate ReleasedDate { get; set; }
// and more properties...
}
My index creation (AbstractMultiMapIndexCreationTask):
AddMap<Product>(Product =>
from product in products
let dateTimeUTc = DateTimeZone.Utc.AtStartOfDay(product.ReleasedDate)
let timeTicks = dateTimeUTc.ToInstant().Ticks
let hash = $"{product.Id}|{timeTicks}"
select new IndexEntry
{
Hash = hash,
Usage = 0
});
With that the index is being generated, the ticks are there, nothing is wrong except that I get an indexing error for each index record in ravendb:
The best overloaded method match for 'NodaTime.DateTimeZone.AtStartOfDay(NodaTime.LocalDate)' has some invalid arguments
Does anybody know why is that?