1- [ ![ Contentstack] ( https://www.contentstack.com/docs/static/images/contentstack.png )] ( https://www.contentstack.com/ )
1+ [ ![ Contentstack] ( https://www.contentstack.com/docs/static/images/contentstack.png )] ( https://www.contentstack.com/ )
22# Contentstack dotnet
33
44.NET SDK for Contentstack's Content Delivery API
@@ -24,7 +24,7 @@ To use the module in your application, you need to first Add Namespace to your c
2424
2525``` cs
2626using Contentstack .Core ; // ContentstackClient
27- using Contentstack .Core .Models ; // Stack, Query, Entry, Asset, ContentType
27+ using Contentstack .Core .Models ; // Stack, Query, Entry, Asset, ContentType, ContentstackCollection
2828using Contentstack .Core .Configuration ; // ContentstackOptions
2929```
3030
@@ -33,13 +33,11 @@ using Contentstack.Core.Configuration; // ContentstackOptions
3333You will need to specify the API key, Access token, and Environment Name of your stack to initialize the SDK:
3434
3535``` cs
36- // Initialize the Contentstack
3736ContentstackClient stack = new ContentstackClient (" api_key" , " access_token" , " enviroment_name" );
3837```
3938or:
4039
4140``` cs
42- //
4341var options = new ContentstackOptions ()
4442{
4543 ApiKey = " <api_key>" ,
@@ -58,7 +56,7 @@ Once you have initialized the SDK, you can start getting content in your app.
5856To retrieve a single entry from a content type, use the code snippet given below:
5957``` cs
6058Entry entry = client .ContentType (" blog" ).Entry (" blta464e9fbd048668c" );
61- entry .Fetch <Product >().ContinueWith ((t ) => {
59+ entry .Fetch <Blog >().ContinueWith ((t ) => {
6260 if (! t .IsFaulted ) {
6361 Console .WriteLine (" entry:" + t .Result );
6462 }
@@ -70,13 +68,12 @@ entry.Fetch<Product>().ContinueWith((t) => {
7068To retrieve multiple entries of a particular content type, use the code snippet given below:
7169
7270``` cs
73-
7471Query query = client .ContentType (" blog" ).Query ();
7572query .Where (" title" , " welcome" );
7673query .IncludeSchema ();
7774query .IncludeCount ();
7875query .ToJSON ();
79- query .Find <Product >().ContinueWith ((t ) => {
76+ query .Find <Blog >().ContinueWith ((t ) => {
8077 if (! t .IsFaulted ) {
8178 ContentstackCollection < Product > result = t .Result ;
8279 Console .WriteLine (" result" + result .items );
0 commit comments