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> GetPerson(long borrowerId) { var data = ArchiveDataRepository.GetManyByPerson(borrowerId); //Check successs if (data != null) { return(Ok(data)); } else { return(NotFound()); } }
public ActionResult <ArchiveData> GetSpecific(long bookId, long borrowerId) { var data = ArchiveDataRepository.GetLastByIds(bookId, borrowerId); //Check successs if (data != null) { return(Ok(data)); } else { return(NotFound()); } }
public ActionResult <ArchiveData> Get(long id) { var data = ArchiveDataRepository.GetSingle(id); //Check successs if (data != null) { return(Ok(data)); } else { return(NotFound()); } }
public ActionResult <IEnumerable <ArchiveData> > Get() { var allData = ArchiveDataRepository.GetAll(); return(Ok(allData)); }
public ActionResult Post(ArchiveData data) { ArchiveDataRepository.AddData(data); return(Ok()); }