Ejemplo n.º 1
0
        public AssetMetadata Get(string id)
        {
            using (var context = new DocumentDbContext())
            {
                context.OpenDatabase(_databaseName);
                var query = context.CreateDocumentQuery <AssetMetadata>(_collectioName)
                            .Where(asset => asset.Id == id);

                return(query.AsEnumerable().FirstOrDefault());
            }
        }