Example #1
0
        public IActionResult CreateEmployeer(DipendenteResource dipendenteResource)
        {
            var dipendente = _mapper.Map <DipendenteResource, Dipendente>(dipendenteResource);

            _homeRepository.AddDipendente(dipendente);

            _unitOfWork.CompleteAsync();

            return(RedirectToAction("Index", "Home", new { area = "AreaAzienda", id = dipendenteResource.CompanyId }));
        }