Shinyshark
Shinyshark
CC#
Created by Shinyshark on 12/2/2024 in #help
Using resourceTypedParamsAndOutputs in bicep
I am writing a bicep file to deploy an app-service. I am using the experimental feature 'resourceTypedParamsAndOutputs' for this.
module nervexisAppService './appService.bicep' = {
name: 'deployAppServices'
params: {
projectName: projectName
environmentAbbreviation: environmentAbbreviation
nervexisRdwMock: functionApps.outputs.nervexisRdwMock
nervexisTecAllianceMock: functionApps.outputs.nervexisRdwMock
nervexisAppServicePlan: nervexisAppServicePlan.outputs.nervexisAppServicePlan
}
}
module nervexisAppService './appService.bicep' = {
name: 'deployAppServices'
params: {
projectName: projectName
environmentAbbreviation: environmentAbbreviation
nervexisRdwMock: functionApps.outputs.nervexisRdwMock
nervexisTecAllianceMock: functionApps.outputs.nervexisRdwMock
nervexisAppServicePlan: nervexisAppServicePlan.outputs.nervexisAppServicePlan
}
}
param nervexisRdwMock resource 'Microsoft.Web/sites@2024-04-01'
param nervexisTecAllianceMock resource 'Microsoft.Web/sites@2024-04-01'
param nervexisAppServicePlan resource 'Microsoft.Web/serverfarms@2024-04-01'

resource nervexisAppService 'Microsoft.Web/sites@2024-04-01' = {
name: '${webAppServicePrefix}-${projectName}-nervexis-${environmentAbbreviation}'
location: resourceGroup().location
kind: 'app'
properties: {
serverFarmId: nervexisAppServicePlan.id
siteConfig: {
appSettings: [
{
name: 'Caching:CacheType'
value: 'Memory'
}
{
name: 'Caching:DistributedCache:InstanceName'
value: 'Nervexis-Gunnewiek-'
}
{
name: 'Rdw:BaseUrl'
value: 'https://${nervexisRdwMock.properties.defaultHostName}'
}
{
name: 'TecAlliance:BaseUrl'
value: 'https://${nervexisTecAllianceMock.properties.defaultHostName}'
}
]
}
}
tags: {
project: projectName
environment: environmentAbbreviation
}
}
param nervexisRdwMock resource 'Microsoft.Web/sites@2024-04-01'
param nervexisTecAllianceMock resource 'Microsoft.Web/sites@2024-04-01'
param nervexisAppServicePlan resource 'Microsoft.Web/serverfarms@2024-04-01'

resource nervexisAppService 'Microsoft.Web/sites@2024-04-01' = {
name: '${webAppServicePrefix}-${projectName}-nervexis-${environmentAbbreviation}'
location: resourceGroup().location
kind: 'app'
properties: {
serverFarmId: nervexisAppServicePlan.id
siteConfig: {
appSettings: [
{
name: 'Caching:CacheType'
value: 'Memory'
}
{
name: 'Caching:DistributedCache:InstanceName'
value: 'Nervexis-Gunnewiek-'
}
{
name: 'Rdw:BaseUrl'
value: 'https://${nervexisRdwMock.properties.defaultHostName}'
}
{
name: 'TecAlliance:BaseUrl'
value: 'https://${nervexisTecAllianceMock.properties.defaultHostName}'
}
]
}
}
tags: {
project: projectName
environment: environmentAbbreviation
}
}
When I attempt to reference the resources, like in the appSettings, I get the following error: 'Deployment template validation failed: 'The template resource 'Microsoft.Web/sites/wapp-gnnwk-nervexis-test' reference to 'Microsoft.Web/sites/fa-gnnwk-rdw-mock' requires an API version. Please see https://aka.ms/arm-syntax for usage details.'
2 replies
CC#
Created by Shinyshark on 1/17/2023 in #help
❔ Overwriting a WPF ListView Style.
I am trying to overwrite a WPF ListView Style to add a button into it at the top. Normally, I would use a UserControl and build a component but there are some issues with hosting items inside of the ListView that make use of x:Name. When I make a new style based on the ListView, a lot of internal items are overwritten such as the GridViewHeaderRowPresenter. How would I go about this issue? Is it a good idea to add this button into a Style or would I have to make a UserControl for it?
2 replies
CC#
Created by Shinyshark on 1/14/2023 in #help
❔ How can I create a UML Class Diagram from an existing .NET 6 Project?
I have a project that has grown to a larger size than I had anticipated. I want to generate a UML Class Diagram so that I can inspect it further. I have followed this tutorial, but the option to add a class diagram is missing. https://learn.microsoft.com/en-us/visualstudio/ide/class-designer/how-to-add-class-diagrams-to-projects?view=vs-2022 I installed the Class Designer. If I open the Visual Studio Installer via the Tools -> Get Tools and Features option, it says the Class Designer is installed. All my projects target .NET 6.0 framework. I have restarted my Visual Studio 2022 Community Edition. I have restarted my computer.
13 replies
CC#
Created by Shinyshark on 11/19/2022 in #help
Unable to create an object of type 'UnitOfWork'. [Answered]
Hello everyone. I have two projects; one is an API and the other is a DAL (Data Access Layer). I want the DbContext and the Migrations to live in the DAL. However, it seems I have to add migrations via the API project. How can I create migrations in the DAL project?
40 replies