public async Task <IActionResult> Put(SaveEnvironmentRequestDTO environmentDTO) { DB.Models.Environment environment = _mapper.Map <DB.Models.Environment>(environmentDTO); var res = _service.Edit(environment); if (res.IsSuccess) { return(Ok()); } else { return(BadRequest(res.Errors)); } }
public IActionResult Add(SaveEnvironmentRequestDTO environmentDTO) { DB.Models.Environment environment = _mapper.Map <DB.Models.Environment>(environmentDTO); var res = _service.Add(environment); if (res.IsSuccess) { return(Ok(res.IsSuccess)); } else { return(BadRequest(res.Errors)); } }