public IActionResult PostFines([FromBody] FinesDTO finesDTO) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _finesService.InsertFine(FinesMapper.MapToFines(finesDTO)); return(Ok()); }
public IActionResult UpdateFine([FromRoute] int id, [FromBody] FinesDTO finesDTO) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _finesService.UpdateFine(FinesMapper.MapToFines(finesDTO)); return(Ok()); }