This file contains hidden or 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
| // serviceUri - the fabric address of the service you want to query for partitions | |
| // this gist assumes your service has an Int64 partitioning scheme. | |
| var fabricClient = new FabricClient(); | |
| var servicePartitionList = await fabricClient.QueryManager.GetPartitionListAsync(serviceUri); | |
| IList<Int64RangePartitionInformation> partitionKeys = new List<Int64RangePartitionInformation>(servicePartitionList.Count); | |
| foreach (var partition in servicePartitionList) | |
| { | |
| var int64PartitionInfo = partition.PartitionInformation as Int64RangePartitionInformation; |
This file contains hidden or 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
| [config] | |
| command = deploy.cmd |
This file contains hidden or 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
| using System; | |
| using System.Collections.Generic; | |
| using System.Security.AccessControl; | |
| using System.Security.Cryptography; | |
| using System.Security.Principal; | |
| using System.Text; | |
| using Microsoft.AspNetCore.Mvc; | |
| namespace Azure.SO.Answer._41615391.Controllers | |
| { |
This file contains hidden or 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
| // Runs all migrations in the assembly of specified type | |
| private static void RunMigrations<T>(string connectionString) | |
| { | |
| var announcer = new NullAnnouncer(); | |
| //var announcer = new TextWriterAnnouncer(s => System.Diagnostics.Debug.WriteLine(s)); | |
| var assembly = typeof(T).Assembly; | |
| var migrationContext = new RunnerContext(announcer); | |
| var options = new MigrationOptions { PreviewOnly = false, Timeout = 60 }; |