public void Put(string id, WeightUnit entity)
		{
			if (ModelState.IsValid)
			{
				db.UpdateWeightUnit(entity.GetPrivateEntity<WeightUnit>());
			}
		}
Exemplo n.º 2
0
        public void InsertWeightUnit(WeightUnit WeightUnit)
        {
            WeightUnit.PartitionKey = GetWeightUnitPartitionKey(WeightUnit);
            WeightUnit.RowKey       = GetWeightUnitRowKey(WeightUnit);
            WeightUnit.PublicId     = WeightUnit.GetPublicId();

            Insert <WeightUnit>(WeightUnit, WeightUnits);
        }
Exemplo n.º 3
0
        public async Task InsertWeightUnitAsync(WeightUnit WeightUnit)
        {
            WeightUnit.PartitionKey = GetWeightUnitPartitionKey(WeightUnit);
            WeightUnit.RowKey       = GetWeightUnitRowKey(WeightUnit);
            WeightUnit.PublicId     = WeightUnit.GetPublicId();

            await InsertAsync <WeightUnit>(WeightUnit, WeightUnits);
        }
		public string Post(WeightUnit entity)
		{
			if (ModelState.IsValid)
			{
				db.InsertWeightUnit(entity);

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

            return string.Empty;
		}
 public string GetWeightUnitRowKey(WeightUnit WeightUnit)
 {
     return(GetWeightUnitRowKey(WeightUnit.ModelGuid));
 }
 public string GetWeightUnitPartitionKey(WeightUnit WeightUnit)
 {
     return(GetPartitionKey(Constants.StorageTableNames.WeightUnits));
 }
Exemplo n.º 7
0
 public async Task DeleteWeightUnitAsync(WeightUnit WeightUnit)
 {
     await DeleteAsync <WeightUnit>(WeightUnit, WeightUnits);
 }
Exemplo n.º 8
0
 public void DeleteWeightUnit(WeightUnit WeightUnit)
 {
     Delete <WeightUnit>(WeightUnit, WeightUnits);
 }
Exemplo n.º 9
0
 public async Task UpdateWeightUnitAsync(WeightUnit WeightUnit)
 {
     await ReplaceAsync <WeightUnit>(WeightUnit, WeightUnits);
 }
Exemplo n.º 10
0
 public void UpdateWeightUnit(WeightUnit WeightUnit)
 {
     Replace <WeightUnit>(WeightUnit, WeightUnits);
 }
        public async Task InsertWeightUnitAsync(WeightUnit WeightUnit)
        {
            WeightUnit.PartitionKey = GetWeightUnitPartitionKey(WeightUnit);
			WeightUnit.RowKey = GetWeightUnitRowKey(WeightUnit);
			WeightUnit.PublicId = WeightUnit.GetPublicId();

            await InsertAsync<WeightUnit>(WeightUnit, WeightUnits);
        }
 public async Task DeleteWeightUnitAsync(WeightUnit WeightUnit)
 {
     await DeleteAsync<WeightUnit>(WeightUnit, WeightUnits);
 }
 public void DeleteWeightUnit(WeightUnit WeightUnit)
 {
     Delete<WeightUnit>(WeightUnit, WeightUnits);
 }
 public async Task UpdateWeightUnitAsync(WeightUnit WeightUnit)
 {
     await ReplaceAsync<WeightUnit>(WeightUnit, WeightUnits);
 }
 public void UpdateWeightUnit(WeightUnit WeightUnit)
 {
     Replace<WeightUnit>(WeightUnit, WeightUnits);
 }
 public string GetWeightUnitPartitionKey(WeightUnit WeightUnit)
 {
     return GetPartitionKey(Constants.StorageTableNames.WeightUnits);
 }
 public string GetWeightUnitRowKey(WeightUnit WeightUnit)
 {
     return GetWeightUnitRowKey(WeightUnit.ModelGuid);
 }
        public void InsertWeightUnit(WeightUnit WeightUnit)
        {
            WeightUnit.PartitionKey = GetWeightUnitPartitionKey(WeightUnit);
			WeightUnit.RowKey = GetWeightUnitRowKey(WeightUnit);
			WeightUnit.PublicId = WeightUnit.GetPublicId();

            Insert<WeightUnit>(WeightUnit, WeightUnits);
        }