public void Put(string id, StockItem entity)
		{
			if (ModelState.IsValid)
			{
				db.UpdateStockItem(entity.GetPrivateEntity<StockItem>());
			}
		}
		public string Post(StockItem entity)
		{
			if (ModelState.IsValid)
			{
				db.InsertStockItem(entity);

				entity.PublicId = entity.GetPublicId();
				return entity.GetPublicEntity<StockItem>().PublicId;
			}

            return string.Empty;
		}
 public async Task DeleteStockItemAsync(StockItem StockItem)
 {
     await DeleteAsync <StockItem>(StockItem, StockItems);
 }
 public async Task UpdateStockItemAsync(StockItem StockItem)
 {
     await ReplaceAsync <StockItem>(StockItem, StockItems);
 }
 public void DeleteStockItem(StockItem StockItem)
 {
     Delete <StockItem>(StockItem, StockItems);
 }
 public string GetStockItemRowKey(StockItem StockItem)
 {
     return(GetStockItemRowKey(StockItem.ModelGuid));
 }
 public void UpdateStockItem(StockItem StockItem)
 {
     Replace <StockItem>(StockItem, StockItems);
 }
 public async Task DeleteStockItemAsync(StockItem StockItem)
 {
     await DeleteAsync<StockItem>(StockItem, StockItems);
 }
 public string GetStockItemPartitionKey(StockItem StockItem)
 {
     return(GetPartitionKey(Constants.StorageTableNames.StockItems));
 }
 public async Task UpdateStockItemAsync(StockItem StockItem)
 {
     await ReplaceAsync<StockItem>(StockItem, StockItems);
 }
 public void DeleteStockItem(StockItem StockItem)
 {
     Delete<StockItem>(StockItem, StockItems);
 }
 public void UpdateStockItem(StockItem StockItem)
 {
     Replace<StockItem>(StockItem, StockItems);
 }
        public async Task InsertStockItemAsync(StockItem StockItem)
        {
            StockItem.PartitionKey = GetStockItemPartitionKey(StockItem);
			StockItem.RowKey = GetStockItemRowKey(StockItem);
			StockItem.PublicId = StockItem.GetPublicId();

            await InsertAsync<StockItem>(StockItem, StockItems);
        }
        public void InsertStockItem(StockItem StockItem)
        {
            StockItem.PartitionKey = GetStockItemPartitionKey(StockItem);
			StockItem.RowKey = GetStockItemRowKey(StockItem);
			StockItem.PublicId = StockItem.GetPublicId();

            Insert<StockItem>(StockItem, StockItems);
        }
 public string GetStockItemRowKey(StockItem StockItem)
 {
     return GetStockItemRowKey(StockItem.ModelGuid);
 }
 public string GetStockItemPartitionKey(StockItem StockItem)
 {
     return GetPartitionKey(Constants.StorageTableNames.StockItems);
 }