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
trigger: | |
- main | |
pool: | |
vmImage: ubuntu-latest | |
steps: | |
- task: PublishBuildArtifacts@1 | |
inputs: | |
PathtoPublish: '$(Build.Repository.LocalPath)/src' |
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 partial class AddProducts : Migration | |
{ | |
protected override void Up(MigrationBuilder migrationBuilder) | |
{ | |
migrationBuilder.CreateTable( | |
name: "Products", | |
columns: table => new | |
{ | |
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), | |
Name = table.Column<string>(type: "nvarchar(max)", nullable: false), |
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
resource "azurerm_application_insights" "app_insight" { | |
name = "onlin-ai-${var.env}" | |
location = azurerm_resource_group.resource_group.location | |
resource_group_name = azurerm_resource_group.resource_group.name | |
application_type = "web" | |
} |
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
terraform { | |
required_providers { | |
azurerm = { | |
source = "hashicorp/azurerm" | |
version = "=2.46.0" | |
} | |
} | |
required_version = ">= 0.14.9" | |
} |
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; } | |
} |
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 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 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
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') |
NewerOlder