This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$testName = "lower-case-unique-name" | |
$resourceGroupName = $testName | |
$location = "westus" | |
$domainName = $testName | |
$subnetName = "Subnet-1" | |
$publisher = "MicrosoftWindowsServer" | |
$offer = "WindowsServer" | |
$sku = "2012-R2-Datacenter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Sign-in as a user in the Owner role | |
# | |
Add-AzureAccount | |
# | |
# Sign-in to MSOL | |
# | |
Connect-MsolService |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$testName = "lower-case-unique-name" | |
$resourceGroupName = $testName | |
$location = "westus" | |
$publisher = "MicrosoftWindowsServer" | |
$offer = "WindowsServer" | |
$sku = "2012-R2-Datacenter" | |
$version = "latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query = ( | |
from entity in bookTable.CreateQuery<DynamicTableEntity>() | |
where entity.Properties["PartitionKey"].StringValue == "hardback"”" && | |
entity.Properties["Year"].Int32Value == 1912 | |
select entity); | |
List<DynamicTableEntity> books = query.ToList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EntityResolver<Writer> resolver = (pk, rk, ts, props, etag) => | |
{ | |
Writer writer = new Writer() { | |
Information = String.Format("{0} wrote {1} in {2}", | |
props["Author"].StringValue, props["Name"].StringValue, | |
props["Year"].Int32Value) | |
}; | |
return writer; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query = | |
(from book in bookTable.CreateQuery<DynamicTableEntity>() | |
where book.PartitionKey == "hardback" | |
select book).Resolve( (pk,rk,ts,props,etag) => | |
String.Format("{0} wrote {1} in {2}", | |
props["Author"].StringValue, props["Name"].StringValue, props["Year"].Int32Value)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public TableQuerySegment<TElement> | |
ExecuteSegmented(TableContinuationToken continuationToken, | |
TableRequestOptions requestOptions = null, | |
OperationContext operationContext = null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public delegate T EntityResolver<T>(string partitionKey, string rowKey, | |
DateTimeOffset timestamp, | |
IDictionary<string, EntityProperty> properties, string etag); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TableQuery<BookEntity> query = | |
(from book in bookTable.CreateQuery<BookEntity>() | |
where book.PartitionKey == "hardback" | |
select book).AsTableQuery<BookEntity>(); | |
TableContinuationToken continuationToken = null; | |
do { | |
var queryResult = query.ExecuteSegmented(continuationToken); | |
foreach (BookEntity entity in queryResult) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query = (from book in bookTable.CreateQuery<BookEntity>() | |
where book.PartitionKey == "hardback" | |
select book).Take(10); |
NewerOlder