public ActionResult <DepenseDTO> Post([FromBody] DepenseDTO depense) { var dep = _mapper.Map <DepenseBL>(depense); _depenseServices.Create(dep); return(CreatedAtRoute("GetDepense", new { id = depense.Id.ToString() }, depense)); }
public IActionResult Put(string id, [FromBody] DepenseDTO depense) { var dep = _depenseServices.GetOne(id); if (dep == null) { return(NotFound()); } var depBL = _mapper.Map <DepenseBL>(depense); _depenseServices.Update(id, depBL); return(NoContent()); }