Skip to content

Commit 03a8bfe

Browse files
authored
Merge pull request #42 from dianambb/AddEtagProperty
Add the Etag as a property in the Entity base class
2 parents b2dd0fc + 6a32c84 commit 03a8bfe

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Templates/ObjC/Models/EntityType.h.tt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if (baseEntity == null)
1818
{
1919
#>
2020
@property (nullable, nonatomic, setter=setODataType:, getter=oDataType) NSString *oDataType;
21+
@property (nullable, nonatomic, setter=setODataEtag:, getter=oDataEtag) NSString *oDataEtag;
2122
<#
2223
}
2324

Templates/ObjC/Models/EntityType.m.tt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ if (entity.Base == null)
5757
{
5858
self.dictionary[@"@odata.type"] = val;
5959
}
60+
- (NSString*) oDataEtag
61+
{
62+
return self.dictionary[@"@odata.etag"];
63+
}
64+
- (void) setODataEtag: (NSString*) val
65+
{
66+
self.dictionary[@"@odata.etag"] = val;
67+
}
6068
<#
6169
}
6270

0 commit comments

Comments
 (0)