Пример #1
0
        public bool UpdatePosition(PositionDTO position)
        {
            Position positionUpdate = new Position();

            positionUpdate.PositionId              = position.PositionId;
            positionUpdate.PositionDescription     = position.PositionDescription;
            dbContext_.Entry(positionUpdate).State = EntityState.Modified;
            return(Save());
        }
Пример #2
0
        public bool UpdateEmployee(EmployeeDTO employee)
        {
            Employee employeeUpdate = new Employee();

            employeeUpdate.EmployeeId              = employee.EmployeeId;
            employeeUpdate.EmployeeName            = employee.EmployeeName;
            employeeUpdate.EmployeeDOB             = DateTime.Parse(employee.DOB);
            employeeUpdate.PositionId              = Int32.Parse(employee.Position);
            dbContext_.Entry(employeeUpdate).State = EntityState.Modified;
            return(Save());
        }