Amazon AWS SDK Guida Utente Pagina 56: Additional Resources
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
context.Save(item);
In the preceding example, the item is inserted through the
DynamoDBContext
class's
Save
method,
which takes an initialized instance of the .NET class that represents the item. (The instance of the
DynamoDBContext
class is initialized with an instance of the
AmazonDynamoDBClient
class.)
The following example shows how to use an instance of this .NET object to get an item from a table in
DynamoDB:
// using Amazon.DynamoDBv2;
// using Amazon.DynamoDBv2.DataModel;
var client = new AmazonDynamoDBClient();
var context = new DynamoDBContext(client);
var item = context.Load<Item>(4, "Fish");
Console.WriteLine("Id = {0}", item.Id);
Console.WriteLine("Type = {0}", item.Type);
Console.WriteLine("Name = {0}", item.Name);
In the preceding example, the item is retrieved through the
DynamoDBContext
class's
Load
method,
which takes a partially-initialized instance of the .NET class that represents the hash-and-range primary
key of the item to be retrieved. (As before, the instance of the
DynamoDBContext
class is initialized with
an instance of the
AmazonDynamoDBClient
class.)
For more information and examples, see
.NET: Object Persistence Model
.
Additional Resources
For additional information and examples of programming DynamoDB with the SDK for .NET, see:
•
DynamoDB APIs
•
DynamoDB Series Kickoff
•
DynamoDB Series - Document Model
•
DynamoDB Series - Conversion Schemas
•
DynamoDB Series - Object Persistence Model
•
DynamoDB Series - Expressions
•
Using Expressions with DynamoDB (p. 52)
•
JSON Support in Amazon DynamoDB (p. 63)
•
Managing ASP.NET Session State with Amazon DynamoDB (p. 65)
Amazon DynamoDB Programming with
Expressions by Using the AWS SDK for .NET
The following code examples demonstrate how to use the SDK for .NET to program DynamoDB with
expressions.
Expressions
denote the attributes that you want to read from an item in a DynamoDB table.
You also use expressions when writing an item, to indicate any conditions that must be met (also known
as a
conditional update
) and to indicate how the attributes are to be updated. Some update examples
are replacing the attribute with a new value, or adding new data to a list or a map. For more information
see
Reading and Writing Items Using Expressions
.
Version v2.0.0
52
AWS SDK for .NET Developer Guide
Additional Resources
File PDF · ·
Domande su Amazon AWS SDK
Non ci sono ancora domande su questo manuale. Fate la prima.
Prodotti e manuali riguardanti Software Amazon AWS SDK
- Software Amazon Redshift Manuale Utente
(24 pagine) - Software Amazon Redshift Manuale Utente
(11 pagine) - Software Amazon AWS SDK Guida Utente
(73 pagine)