public ActionResult Delete(long id) { var person = ArchiveDataRepository.GetSingle(id); if (person != null) { ArchiveDataRepository.DeleteData(person); return(Ok()); } return(NotFound()); }
public ActionResult Put(ArchiveData person, long id) { var dbPerson = ArchiveDataRepository.GetSingle(id); //Update if it exist if (dbPerson != null) { ArchiveDataRepository.UpdateData(person); return(Ok()); } return(NotFound()); }
public ActionResult <ArchiveData> Get(long id) { var data = ArchiveDataRepository.GetSingle(id); //Check successs if (data != null) { return(Ok(data)); } else { return(NotFound()); } }