public async Task <IActionResult> PutXScheduleSubst([FromRoute] Guid id, [FromBody] XScheduleSubst varXScheduleSubst)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != varXScheduleSubst.XScheduleSubstId)
            {
                return(BadRequest());
            }

            _context.Entry(varXScheduleSubst).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!XScheduleSubstExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
        public async Task <IActionResult> PostXScheduleSubst([FromBody] XScheduleSubst varXScheduleSubst)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _context.XScheduleSubst.Add(varXScheduleSubst);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetXScheduleSubst", new { id = varXScheduleSubst.XScheduleSubstId }, varXScheduleSubst));
        }