public IActionResult NewLdpr([FromBody] LdprModel ldpr) { try { _unitOfWork.LdprRepository.Insert(ldpr); _unitOfWork.Save(); return(Ok("Message received successfully.")); } catch (System.Exception ex) { return(BadRequest()); } }
public IActionResult Get(int id) { try { LdprModel result = _unitOfWork.LdprRepository.GetById(id); return(Ok(result)); } catch (System.Exception) { return(BadRequest()); throw; } }
public IActionResult UpdateLdpr([FromBody] LdprModel model) { try { _unitOfWork.LdprRepository.Update(model); _unitOfWork.Save(); return(Ok(model)); } catch (System.Exception ex) { return(BadRequest()); throw; } }