Ejemplo n.º 1
0
		/// <summary>
		/// Save an image document
		/// </summary>
		/// <returns></returns>
		public void Save(ImageDoc doc) {
			ImageDocActions imageActions = new ImageDocActions(this.explorer);
			ReplaceOneResult result = imageActions.Save(doc);
			if (result.UpsertedId != null) {
				doc.Id = result.UpsertedId.AsObjectId;
			}
		}
Ejemplo n.º 2
0
		/// <summary>
		/// Get all images from the database
		/// </summary>
		/// <returns></returns>
		public async Task<List<ImageDoc>> GetImagesAsync(string name) {
			ImageDocActions imageActions = new ImageDocActions(this.explorer);
			return await imageActions.GetListAsync("name", name).ConfigureAwait(false);
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Get all images from the database
		/// </summary>
		/// <returns></returns>
		public async Task<List<ImageDoc>> GetImagesAsync(ImageDoc.ImageFilter filter) {
			ImageDocActions imageActions = new ImageDocActions(this.explorer);
			return await imageActions.GetListAsync(filter).ConfigureAwait(false);
		}
Ejemplo n.º 4
0
		/// <summary>
		/// Get all images from the database
		/// </summary>
		/// <returns></returns>
		public List<ImageDoc> GetImages() {
			ImageDocActions imageActions = new ImageDocActions(this.explorer);
			List<ImageDoc> images = imageActions.GetList();
			return images;
		}