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

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

                this.OnShiftHourReportCreated(item);
                this.context.ShiftHourReports.Add(item);
                this.context.SaveChanges();

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

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

                this.OnShiftHourReportUpdated(newItem);
                this.context.ShiftHourReports.Update(newItem);
                this.context.SaveChanges();

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