public async Task <IActionResult> CreateEmployeePayHistory([FromBody] HumanResources.EmployeePayHistory value)
        {
            _db.HumanResources_EmployeePayHistory.Add(value);
            await _db.SaveChangesAsync();

            return(Ok(value));
        }
        public async Task <IActionResult> EditEmployeePayHistory(int businessEntityID, DateTime rateChangeDate, [FromBody] HumanResources.EmployeePayHistory value)
        {
            var existing = await _db.HumanResources_EmployeePayHistory.FirstOrDefaultAsync(x => x.BusinessEntityID == businessEntityID && x.RateChangeDate == rateChangeDate);

            if (existing == null)
            {
                return(NotFound());
            }

            existing.BusinessEntityID = value.BusinessEntityID;
            existing.RateChangeDate   = value.RateChangeDate;
            existing.Rate             = value.Rate;
            existing.PayFrequency     = value.PayFrequency;
            existing.ModifiedDate     = value.ModifiedDate;

            _db.HumanResources_EmployeePayHistory.Update(existing);
            await _db.SaveChangesAsync();

            return(NoContent());
        }