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

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

                this.OnFm1PickAndPlace5219ReportHourShiftCreated(item);
                this.context.Fm1PickAndPlace5219ReportHourShifts.Add(item);
                this.context.SaveChanges();

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

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

                this.OnFm1PickAndPlace5219ReportHourShiftUpdated(newItem);
                this.context.Fm1PickAndPlace5219ReportHourShifts.Update(newItem);
                this.context.SaveChanges();

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