public void Put(string id, StockUnit entity)
		{
			if (ModelState.IsValid)
			{
				db.UpdateStockUnit(entity.GetPrivateEntity<StockUnit>());
			}
		}
        public async Task InsertStockUnitAsync(StockUnit StockUnit)
        {
            StockUnit.PartitionKey = GetStockUnitPartitionKey(StockUnit);
            StockUnit.RowKey       = GetStockUnitRowKey(StockUnit);
            StockUnit.PublicId     = StockUnit.GetPublicId();

            await InsertAsync <StockUnit>(StockUnit, StockUnits);
        }
        public void InsertStockUnit(StockUnit StockUnit)
        {
            StockUnit.PartitionKey = GetStockUnitPartitionKey(StockUnit);
            StockUnit.RowKey       = GetStockUnitRowKey(StockUnit);
            StockUnit.PublicId     = StockUnit.GetPublicId();

            Insert <StockUnit>(StockUnit, StockUnits);
        }
		public string Post(StockUnit entity)
		{
			if (ModelState.IsValid)
			{
				db.InsertStockUnit(entity);

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

            return string.Empty;
		}
 public async Task UpdateStockUnitAsync(StockUnit StockUnit)
 {
     await ReplaceAsync <StockUnit>(StockUnit, StockUnits);
 }
 public void UpdateStockUnit(StockUnit StockUnit)
 {
     Replace <StockUnit>(StockUnit, StockUnits);
 }
示例#7
0
 public string GetStockUnitRowKey(StockUnit StockUnit)
 {
     return(GetStockUnitRowKey(StockUnit.ModelGuid));
 }
示例#8
0
 public string GetStockUnitPartitionKey(StockUnit StockUnit)
 {
     return(GetPartitionKey(Constants.StorageTableNames.StockUnits));
 }
        public async Task InsertStockUnitAsync(StockUnit StockUnit)
        {
            StockUnit.PartitionKey = GetStockUnitPartitionKey(StockUnit);
			StockUnit.RowKey = GetStockUnitRowKey(StockUnit);
			StockUnit.PublicId = StockUnit.GetPublicId();

            await InsertAsync<StockUnit>(StockUnit, StockUnits);
        }
 public string GetStockUnitPartitionKey(StockUnit StockUnit)
 {
     return GetPartitionKey(Constants.StorageTableNames.StockUnits);
 }
 public async Task DeleteStockUnitAsync(StockUnit StockUnit)
 {
     await DeleteAsync<StockUnit>(StockUnit, StockUnits);
 }
 public void DeleteStockUnit(StockUnit StockUnit)
 {
     Delete<StockUnit>(StockUnit, StockUnits);
 }
 public async Task UpdateStockUnitAsync(StockUnit StockUnit)
 {
     await ReplaceAsync<StockUnit>(StockUnit, StockUnits);
 }
 public void UpdateStockUnit(StockUnit StockUnit)
 {
     Replace<StockUnit>(StockUnit, StockUnits);
 }
 public void DeleteStockUnit(StockUnit StockUnit)
 {
     Delete <StockUnit>(StockUnit, StockUnits);
 }
 public string GetStockUnitRowKey(StockUnit StockUnit)
 {
     return GetStockUnitRowKey(StockUnit.ModelGuid);
 }
 public async Task DeleteStockUnitAsync(StockUnit StockUnit)
 {
     await DeleteAsync <StockUnit>(StockUnit, StockUnits);
 }
        public void InsertStockUnit(StockUnit StockUnit)
        {
            StockUnit.PartitionKey = GetStockUnitPartitionKey(StockUnit);
			StockUnit.RowKey = GetStockUnitRowKey(StockUnit);
			StockUnit.PublicId = StockUnit.GetPublicId();

            Insert<StockUnit>(StockUnit, StockUnits);
        }