This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11using Azure . Identity ;
22using Azure . Messaging . EventGrid ;
3- using Microsoft . EntityFrameworkCore ;
43using Microsoft . Extensions . DependencyInjection ;
54using Microsoft . Extensions . Hosting ;
6- using ServiceLayer . API . Data ;
75
86var eventGridTopicUrl = Environment . GetEnvironmentVariable ( "EVENT_GRID_TOPIC_URL" )
97 ?? throw new InvalidOperationException ( $ "Environment variable 'EVENT_GRID_TOPIC_URL' is not set or is empty.") ;
108var eventGridTopicKey = Environment . GetEnvironmentVariable ( "EVENT_GRID_TOPIC_KEY" )
119 ?? throw new InvalidOperationException ( $ "Environment variable 'EVENT_GRID_TOPIC_KEY' is not set or is empty.") ;
12- var databaseConnectionString = Environment . GetEnvironmentVariable ( "DatabaseConnectionString" )
13- ?? throw new InvalidOperationException ( $ "Environment variable 'DatabaseConnectionString' is not set or is empty.") ;
14-
1510
1611var host = new HostBuilder ( )
1712 . ConfigureFunctionsWebApplication ( )
2823
2924 return new EventGridPublisherClient ( endpoint , new ManagedIdentityCredential ( ) ) ;
3025 } ) ;
31- services . AddDbContext < ServiceLayerDbContext > ( options =>
32- {
33- options . UseSqlServer ( databaseConnectionString ) ;
34- } ) ;
35- services . AddLogging ( ) ;
3626 } )
3727 . Build ( ) ;
3828
Original file line number Diff line number Diff line change 1414 <PackageReference Include =" Microsoft.Azure.Functions.Worker.Extensions.Http" Version =" 3.3.0" />
1515 <PackageReference Include =" Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version =" 2.0.1" />
1616 <PackageReference Include =" Microsoft.Azure.Functions.Worker.Sdk" Version =" 2.0.2" />
17- <PackageReference Include =" Microsoft.EntityFrameworkCore" Version =" 9.0.1" />
18- <PackageReference Include =" Microsoft.EntityFrameworkCore.Design" Version =" 9.0.1" />
19- <PackageReference Include =" Microsoft.EntityFrameworkCore.SqlServer" Version =" 9.0.1" />
2017 </ItemGroup >
2118 <ItemGroup >
2219 <None Update =" host.json" >
You can’t perform that action at this time.
0 commit comments