/// <summary> /// Method to insert a new Artifact based on the attributes of the storeageFile passed in. /// Returns the new Artifact /// </summary> /// <param name="artifact"></param> /// <returns></returns> private async Task <Artifact> InsertArtifact(StorageFile artifact) { var newArtifact = new Artifact { Path = artifact.Path, Title = GetDefaultArtifactTitle(artifact.Name, artifact.FileType), FileType = artifact.FileType, FileName = artifact.Name, DateAdded = DateTime.Now, Active = true }; await _artifactRepo.SaveAsync(newArtifact); return(newArtifact); }