Closed abbasl closed 3 years ago
Hi,
For now Azure Table Storage does not support 'decimal'. But I'll check if we could serialize and deserializa it to string or something like to store on Azure.
Thanks, Gabriel Marquez
@gblmarquez any updates on this topic?
@forgotten-warrior, please feel free to send a pull request which brings this functionality.
@dtretyakov This PR brings the functionality https://github.com/dtretyakov/WindowsAzure/pull/65.
@abbasl @forgotten-warrior #65 is merged to master you can start using it. 4
Can you please add support for entities to have decimal data types?
My entity looks like this: public sealed class Product { [PartitionKey] public string EntityType { get { return "product"; } } [RowKey] public string Sku { get; set; } public string Name { get; set; } public double Price { get; set; } }
I receive this error when I call the .AddOrUpdate method on a collection of such entities: Invalid entity member type: 'System.Decimal'.
Here is the stack trace: at WindowsAzure.Table.EntityConverters.TypeData.ValueAccessors.ValueAccessorBaseb__0[T](Type type)
at System.Collections.Concurrent.ConcurrentDictionary
1.CreateValueAccessors(ParameterExpression instanceExpression, MemberExpression memberExpression) at WindowsAzure.Table.EntityConverters.TypeData.ValueAccessors.PropertyValueAccessor
1..ctor(PropertyInfo propertyInfo) at WindowsAzure.Table.EntityConverters.TypeData.ValueAccessors.ValueAccessorFactory.Create[T](MemberInfo memberInfo) at WindowsAzure.Table.EntityConverters.TypeData.Properties.RegularProperty1..ctor(MemberInfo member, String name) at WindowsAzure.Table.EntityConverters.TypeData.Properties.RegularProperty
1..ctor(MemberInfo member) at WindowsAzure.Table.EntityConverters.TypeData.EntityTypeData1.GetMemberProperty(MemberInfo member, IDictionary
2 nameChanges) at WindowsAzure.Table.EntityConverters.TypeData.EntityTypeData1.<.ctor>b__1(MemberInfo member) at System.Linq.Enumerable.WhereSelectListIterator
2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at WindowsAzure.Table.EntityConverters.TypeData.EntityTypeData
1..ctor() at WindowsAzure.Table.EntityConverters.TypeData.EntityTypeDataFactory.2.GetOrAdd(TKey key, Func
2 valueFactory) at WindowsAzure.Table.EntityConverters.TypeData.EntityTypeDataFactory.GetEntityTypeData[T]() at WindowsAzure.Table.EntityConverters.TableEntityConverter1..ctor() at WindowsAzure.Table.TableSet
1..ctor(CloudTableClient cloudTableClient, String tableName) at WindowsAzure.Table.TableSet`1..ctor(CloudTableClient cloudTableClient)