public async Task<IHttpActionResult> PostDocument(DocumentMetadata metadata) { IdentityUser user = await DbFacade.FindUserByName(this.User.Identity.Name); metadata.UserId = user.Id; metadata.Page = 0; metadata.LastBookmarkUpdate = DateTime.UtcNow; DbFacade.InsertDocument(metadata); DbFacade.Save(); return this.Ok(metadata.Id.ToString()); }
public DocumentMetadata PassValuesTo(DocumentMetadata document) { document.LastBookmarkUpdate = this.LastUpdate; document.Page = this.Page; return document; }
public Bookmark(DocumentMetadata document) { this.Id = document.Id; this.Page = document.Page; this.LastUpdate = document.LastBookmarkUpdate; }
public void InsertDocument(DocumentMetadata document) { this.set.Add(document); }
public void DeleteDocument(DocumentMetadata document) { this.set.Remove(document); }
public static void InsertDocument(DocumentMetadata metadata) { UnitOfWork.Instance.DocumentRepository.InsertDocument(metadata); }