public IActionResult Post([FromBody] Models.Sortimat.Sh2PickAndPlace5307PerShiftPerCycle item)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                if (item == null)
                {
                    return(BadRequest());
                }

                this.OnSh2PickAndPlace5307PerShiftPerCycleCreated(item);
                this.context.Sh2PickAndPlace5307PerShiftPerCycles.Add(item);
                this.context.SaveChanges();

                return(Created($"odata/Sortimat/Sh2PickAndPlace5307PerShiftPerCycles/{item.RowID}", item));
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("", ex.Message);
                return(BadRequest(ModelState));
            }
        }
        public IActionResult PutSh2PickAndPlace5307PerShiftPerCycle(int key, [FromBody] Models.Sortimat.Sh2PickAndPlace5307PerShiftPerCycle newItem)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest(ModelState));
                }

                if (newItem == null || (newItem.RowID != key))
                {
                    return(BadRequest());
                }

                this.OnSh2PickAndPlace5307PerShiftPerCycleUpdated(newItem);
                this.context.Sh2PickAndPlace5307PerShiftPerCycles.Update(newItem);
                this.context.SaveChanges();

                var itemToReturn = this.context.Sh2PickAndPlace5307PerShiftPerCycles.Where(i => i.RowID == key);
                return(new ObjectResult(SingleResult.Create(itemToReturn)));
            }
            catch (Exception ex)
            {
                ModelState.AddModelError("", ex.Message);
                return(BadRequest(ModelState));
            }
        }
 partial void OnSh2PickAndPlace5307PerShiftPerCycleUpdated(Models.Sortimat.Sh2PickAndPlace5307PerShiftPerCycle item);