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

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

                this.OnSh1Assembly5202PerBatchPerCycleCreated(item);
                this.context.Sh1Assembly5202PerBatchPerCycles.Add(item);
                this.context.SaveChanges();

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

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

                this.OnSh1Assembly5202PerBatchPerCycleUpdated(newItem);
                this.context.Sh1Assembly5202PerBatchPerCycles.Update(newItem);
                this.context.SaveChanges();

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