public DepartementDto AddDepartement(DepartementForAddDto dep) { Departement e = mapper.Map <Departement>(dep); this.departementRepository.AddDepartement(e); this.departementRepository.SaveChanges(); DepartementDto depdto = mapper.Map <DepartementDto>(e); return(depdto); }
public IActionResult PostDepartement([FromBody] DepartementForAddDto dep) { return(Created("", this.departementService.AddDepartement(dep))); }