public async Task <IActionResult> CreateEmployee_Temporal([FromBody] HumanResources.Employee_Temporal value)
        {
            _db.HumanResources_Employee_Temporal.Add(value);
            await _db.SaveChangesAsync();

            return(Ok(value));
        }
        public async Task <IActionResult> EditEmployee_Temporal(int businessEntityID, [FromBody] HumanResources.Employee_Temporal value)
        {
            var existing = await _db.HumanResources_Employee_Temporal.FirstOrDefaultAsync(x => x.BusinessEntityID == businessEntityID);

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

            existing.BusinessEntityID  = value.BusinessEntityID;
            existing.NationalIDNumber  = value.NationalIDNumber;
            existing.LoginID           = value.LoginID;
            existing.OrganizationNode  = value.OrganizationNode;
            existing.OrganizationLevel = value.OrganizationLevel;
            existing.JobTitle          = value.JobTitle;
            existing.BirthDate         = value.BirthDate;
            existing.MaritalStatus     = value.MaritalStatus;
            existing.Gender            = value.Gender;
            existing.HireDate          = value.HireDate;
            existing.VacationHours     = value.VacationHours;
            existing.SickLeaveHours    = value.SickLeaveHours;
            existing.ValidFrom         = value.ValidFrom;
            existing.ValidTo           = value.ValidTo;

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

            return(NoContent());
        }