public async Task UpdateDocumentPage(Page page) { var documents = await this.DeserializeDocuments(); var documentToUpdate = documents.FirstOrDefault(d => d.ID == page.DocumentId); var pageToUpdate = documentToUpdate.Pages.FirstOrDefault(p => p.ID == page.ID); pageToUpdate = page; await this.SerializeDocuments(documents); }
public async Task UpdateDocumentPage(Page page) { var documents = await this.DeserializeDocuments(); var documentToUpdate = documents.FirstOrDefault(d => d.ID == page.DocumentId); var pageToUpdate = documentToUpdate.Pages.FirstOrDefault(p => p.ID == page.ID); pageToUpdate = page; await this.SerializeDocuments(documents); }