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
##################################################################################### | |
# | |
# Script that will get IP address machine and add/remove in storage account firewall | |
# Action Parameter: Add/Remove | |
# | |
##################################################################################### | |
param( | |
[string]$AccountStorageName, | |
[string]$Action |
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
using Microsoft.Extensions.DependencyInjection; | |
using System; | |
namespace GenericSqlDatabseServiceFactory | |
{ | |
internal class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var serviceCollection = new ServiceCollection(); |
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
namespace Customer.WebApi.Extensions | |
{ | |
public static class AppExtensions | |
{ | |
public static void UseUnitOfWorkMiddleware(this IApplicationBuilder app) | |
{ | |
app.UseMiddleware<UnitOfWorkMiddleware>(); | |
} | |
} | |
} |
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
namespace Customer.WebApi.Controllers | |
{ | |
[ApiController] | |
[Route("api/v{version:apiVersion}/[controller]")] | |
public abstract class BaseApiController<TDto> : ControllerBase where TDto : class, new() | |
{ | |
private IMediator _mediator; | |
protected IMediator Mediator => _mediator ??= HttpContext.RequestServices.GetService<IMediator>(); | |
[HttpDelete("Remove")] |
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
# This simple PowerShell script will copy one or more Azure storage table from one location into another azure storage table | |
# | |
# Dependencies : | |
# https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy | |
# https://docs.microsoft.com/en-us/powershell/azure/overview?view=azps-1.6.0 | |
# | |
# Usage : | |
# Copy-AzureStorageTable -SrcStorageName "" -SrcAccessKey "" -DstStorageName "" -DstAccessKey "" -IncludeTable All | |
# Copy-AzureStorageTable -SrcStorageName "" -SrcAccessKey "" -DstStorageName "" -DstAccessKey "" -IncludeTable Table1,Table2,Table3 |
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
namespace ScheduleWebJobHandler | |
{ | |
/// <summary> | |
/// Example of console app that use WebJobTimeoutHandler | |
/// </summary> | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
System.Console.WriteLine("Scheduled Job started."); |
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
using Dapper; | |
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
namespace ColumnAttrMapper | |
{ | |
public class BaseTypeMapper : SqlMapper.ITypeMap | |
{ | |
private readonly IEnumerable<SqlMapper.ITypeMap> _mappers; |