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
try | |
{ | |
// network call | |
} | |
catch(Exception e) | |
{ | |
_logger.Warning(e, "Network call failed"); | |
} |
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
try | |
{ | |
// notify customer about rejected card purchase | |
} | |
catch(Exception e) | |
{ | |
_logger.Fatal(e, "Failed to notify customer about rejected card purchase. Please ask Customer Care Center to call the customer and tell him/her about this to avoid degradation of reputation"); | |
} |
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
public class CustomerIntegrationModel | |
{ | |
public string CustomerId { get; set; } | |
public string Name { get; set; } | |
} | |
public class CustomerRequestModel | |
{ | |
public string CustomerId { get; set; } | |
public string Name { get; set; } |
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
{ | |
"attribute1": { | |
"DataType": "String", | |
"StringValue": "value1" | |
} | |
} |
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
{ | |
"Source": "From AWAS CLI", | |
"EntityId": "e165a1df-f792-4043-a601-929c1576ee1d" | |
} |
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
public class CustomerModel | |
{ | |
public string CustomerId { get; set; } | |
public string Name { get; set; } | |
} |
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
public async Task FunctionHandler(SQSEvent evnt, ILambdaContext context) | |
{ | |
// Calling CreateScope() here is required to resolve scoped services correctly | |
using var scope = ServiceProvider.CreateScope(); | |
await scope.ServiceProvider.GetService<App>().Run(evnt); | |
} |
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
// See https://aka.ms/new-console-template for more information | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Amazon; | |
using Amazon.DynamoDBv2; | |
using Amazon.DynamoDBv2.Model; | |
using IAmazonDynamoDB client = new AmazonDynamoDBClient(RegionEndpoint.EUNorth1); |
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 IAmazonDynamoDB client = new AmazonDynamoDBClient(RegionEndpoint.EUNorth1); |
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
var query = new QueryRequest | |
{ | |
TableName = "customertestjim", | |
KeyConditionExpression = "CustomerId = :Id", | |
ExpressionAttributeValues = new Dictionary<string, AttributeValue> | |
{ | |
{ ":Id", new AttributeValue { S = "12345" }} | |
} | |
}; |