Beispiel #1
0
 /// <summary>
 /// Delete document by it's id.
 /// </summary>
 /// <param name="id">ID of the document without classname</param>
 /// <returns></returns>
 public static async Task DeleteItemById(string id)
 {
     await DeleteItemByDocumentId(DocumentWrapHelper.ConcateIds(typeof(T).Name, id));
 }
Beispiel #2
0
        public static async Task <T> GetById(string id)
        {
            var res = await TryGetById(id);

            if (res == null)
            {
                throw new KeyNotFoundException(String.Format("Document not found with id: {0}", DocumentWrapHelper.ConcateIds(typeof(T).Name, id)));
            }
            return(res);
        }