public bool SaveBatch(List <BaseAzureTableStorage> entities) { TableStorageService <BaseAzureTableStorage> StorageService = new TableStorageService <BaseAzureTableStorage>(DeviceInputDataConstants.TableName); StorageService.CreateTable(); return(StorageService.BatchInsert(entities)); }
public bool Save(DeviceInput entity) { //List<Entity.BaseNoSqlEntity> lst = new List<Entity.BaseNoSqlEntity>(); //entity.RowKey = entity.ID.ToString(); //entity.PartitionKey = ApartmentConstants.PartitionKey; //entity.TableName = "Device"; //lst.Add(entity); //Entity.Address address = entity.Address; //address.PartitionKey = ApartmentConstants.PartitionKey; //address.TableName = "Address"; //address.RowKey = address.ID.ToString(); //lst.Add(address); //return SaveBatch(lst); TableStorageService <BaseAzureTableStorage> StorageService = new TableStorageService <BaseAzureTableStorage>(DeviceInputDataConstants.TableName); StorageService.CreateTable(); return(StorageService.Insert(entity)); }