Exemple #1
0
        public async Task <int> InsertEmployee(CarWashWorkersBll carWashWorkersBll)
        {
            CarWashWorkers carWashWorkers = Mapper.Map <CarWashWorkersBll, CarWashWorkers>(carWashWorkersBll);

            _unitOfWork.CarWashWorkersUnitOfWork.Insert(carWashWorkers);
            await _unitOfWork.Save();

            return(carWashWorkers.id);
        }
Exemple #2
0
        public async Task UpdateEmploee(CarWashWorkersBll carWashWorkersId, string action)
        {
            CarWashWorkers carWashWorkers = Mapper.Map <CarWashWorkersBll, CarWashWorkers>(carWashWorkersId);

            if (action == "Delete")// перед увольнением предусмотреть
            {
                carWashWorkers.status        = false;
                carWashWorkers.DataDismissal = DateTime.Now;
            }

            _unitOfWork.CarWashWorkersUnitOfWork.Update(carWashWorkers);
            await _unitOfWork.Save();
        }