GET http://localhost:5000/api/Products HTTP/1.1
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
private async Task<IActionResult> ProcessResponse(Response response) | |
{ | |
var responseContent = await response.Body.ReadAsStringAsync(); | |
if (string.IsNullOrEmpty(responseContent) == false) | |
{ | |
return BadRequest(responseContent); | |
} | |
var header = response.Headers.FirstOrDefault(h => h.Key == "X-Message-Id"); |
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
# ASP.NET Core (.NET Framework) | |
# Build and test ASP.NET Core projects targeting the full .NET Framework. | |
# Add steps that publish symbols, save build artifacts, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core | |
trigger: | |
branches: | |
include: | |
- master | |
paths: |
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 interface IRepository | |
{ | |
} |
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 DecoratorAttribute : Attribute | |
{ | |
} |
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
IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = 'Database1') | |
BEGIN | |
CREATE DATABASE [Database1] | |
END | |
GO | |
USE [Database1] | |
GO | |
--You need to check if the table exists | |
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name='Users' and xtype='U') |
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 ClaimResolutionStrategy : ITenantResolutionStrategy | |
{ | |
private readonly IHttpContextAccessor _httpContextAccessor; | |
public ClaimResolutionStrategy(IHttpContextAccessor httpContextAccessor) | |
{ | |
_httpContextAccessor = httpContextAccessor; | |
} | |
public Task<Guid> GetTenantIdentifierAsync() |
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 BasePage : ComponentBase | |
{ | |
protected FormValidator FormValidator; | |
protected void ShowError(Result result, object model = null) | |
{ | |
FormValidator?.ShowError(result, model); | |
} | |
protected void ShowMessage(string message) |
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 ConnectionStringBuilder : IConnectionStringBuilder | |
{ | |
private readonly ITenantAccessService _tenantAccessService; | |
private readonly IConfiguration _configuration; | |
public ConnectionStringBuilder(ITenantAccessService tenantAccessService, | |
IConfiguration configuration) | |
{ | |
_tenantAccessService = tenantAccessService; | |
_configuration = configuration; |
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 AuditLog | |
{ | |
public Guid Id { get; set; } = Guid.NewGuid(); | |
public DateTimeOffset Created { get; set; } = DateTimeOffset.UtcNow; | |
public string LogType { get; set; } | |
public string Data { get; set; } | |
} |