devlooped/TableStorage

If partition or row key expressions have complex lambda, property name should be null

kzu opened this issue · 0 comments

kzu commented

For example:

        var repo = TableRepository.Create<Show>(CloudStorageAccount.DevelopmentStorageAccount,
            "Shows",
            x => $"{x.FromDate.Year}",
            x => $"{x.FromDate:yyyy-MM-dd}-{x.Id}");

In this case, the partition key should not be assumed to be FromDate since we're actually using just the year and that would fail to deserialize the object (if it had a FromDate constructor/property of type DateOnly).