-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from seesharprun/dotnet-9-update
Update to .NET 9
- Loading branch information
Showing
22 changed files
with
231 additions
and
196 deletions.
There are no files selected for viewing
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 file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base | ||
USER app | ||
WORKDIR /app | ||
EXPOSE 8080 | ||
EXPOSE 8081 | ||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build | ||
ARG BUILD_CONFIGURATION=Release | ||
WORKDIR /src | ||
COPY ["web/Microsoft.Samples.Cosmos.NoSQL.Quickstart.Web.csproj", "web/"] | ||
COPY ["models/Microsoft.Samples.Cosmos.NoSQL.Quickstart.Models.csproj", "models/"] | ||
COPY ["services/Microsoft.Samples.Cosmos.NoSQL.Quickstart.Services.csproj", "services/"] | ||
COPY ["Microsoft.Samples.Cosmos.NoSQL.Quickstart.sln", "."] | ||
RUN dotnet restore "Microsoft.Samples.Cosmos.NoSQL.Quickstart.sln" | ||
COPY . . | ||
RUN dotnet build "Microsoft.Samples.Cosmos.NoSQL.Quickstart.sln" -c $BUILD_CONFIGURATION -o /app/build | ||
|
||
FROM build AS publish | ||
ARG BUILD_CONFIGURATION=Release | ||
RUN dotnet publish "web/Microsoft.Samples.Cosmos.NoSQL.Quickstart.Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false | ||
|
||
FROM base AS final | ||
WORKDIR /app | ||
COPY --from=publish /app/publish . | ||
ENTRYPOINT ["dotnet", "Microsoft.Samples.Cosmos.NoSQL.Quickstart.Web.dll"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Samples.Cosmos.NoSQL.Quickstart.Web", "web\Microsoft.Samples.Cosmos.NoSQL.Quickstart.Web.csproj", "{DB1EBDE0-AA02-4D28-8574-EF28DAC09147}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Samples.Cosmos.NoSQL.Quickstart.Models", "models\Microsoft.Samples.Cosmos.NoSQL.Quickstart.Models.csproj", "{5FC7FBD8-3D5B-4E86-AFA5-DC26BA5CB4D3}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Samples.Cosmos.NoSQL.Quickstart.Services", "services\Microsoft.Samples.Cosmos.NoSQL.Quickstart.Services.csproj", "{BE19E8F8-0FE7-437B-AFD3-F31F854BCE87}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{DB1EBDE0-AA02-4D28-8574-EF28DAC09147}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{DB1EBDE0-AA02-4D28-8574-EF28DAC09147}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{DB1EBDE0-AA02-4D28-8574-EF28DAC09147}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{DB1EBDE0-AA02-4D28-8574-EF28DAC09147}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{5FC7FBD8-3D5B-4E86-AFA5-DC26BA5CB4D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5FC7FBD8-3D5B-4E86-AFA5-DC26BA5CB4D3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5FC7FBD8-3D5B-4E86-AFA5-DC26BA5CB4D3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5FC7FBD8-3D5B-4E86-AFA5-DC26BA5CB4D3}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{BE19E8F8-0FE7-437B-AFD3-F31F854BCE87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{BE19E8F8-0FE7-437B-AFD3-F31F854BCE87}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{BE19E8F8-0FE7-437B-AFD3-F31F854BCE87}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{BE19E8F8-0FE7-437B-AFD3-F31F854BCE87}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
EndGlobal |
7 changes: 7 additions & 0 deletions
7
src/models/Microsoft.Samples.Cosmos.NoSQL.Quickstart.Models.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
</Project> |
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
12 changes: 4 additions & 8 deletions
12
src/web/Services/DemoService.cs → src/services/DemoService.cs
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace Microsoft.Samples.Cosmos.NoSQL.Quickstart.Services.Interfaces; | ||
|
||
public interface IDemoService | ||
{ | ||
Task RunAsync(Func<string, Task> writeOutputAync); | ||
|
||
string GetEndpoint(); | ||
} |
14 changes: 14 additions & 0 deletions
14
src/services/Microsoft.Samples.Cosmos.NoSQL.Quickstart.Services.csproj
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net9.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.*" /> | ||
<PackageReference Include="Newtonsoft.Json" Version="13.*" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\models\Microsoft.Samples.Cosmos.NoSQL.Quickstart.Models.csproj" /> | ||
</ItemGroup> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<base href="/" /> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1/font/bootstrap-icons.min.css"> | ||
<ImportMap /> | ||
<link rel="icon" type="image/png" href="favicon.png" /> | ||
<HeadOutlet /> | ||
<PageTitle> | ||
Azure Cosmos DB for NoSQL | ||
</PageTitle> | ||
</head> | ||
|
||
<body data-bs-theme="dark"> | ||
<Routes /> | ||
<script src="_framework/blazor.web.js"></script> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css"> | ||
</body> | ||
|
||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@inherits LayoutComponentBase | ||
|
||
<main class="container"> | ||
<h1 class="my-5 text-center"> | ||
Azure Cosmos DB for NoSQL | .NET Quickstart | ||
</h1> | ||
@Body | ||
<div id="blazor-error-ui" class="collapse fixed-top rounded-0 mb-0 alert alert-danger" role="alert"> | ||
An unhandled error has occurred. | ||
<a href="." class="reload">Reload</a> | ||
<span class="dismiss">🗙</span> | ||
</div> | ||
</main> |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@using System.Net.Http | ||
@using System.Net.Http.Json | ||
@using Microsoft.AspNetCore.Components.Forms | ||
@using Microsoft.AspNetCore.Components.Routing | ||
@using Microsoft.AspNetCore.Components.Web | ||
@using static Microsoft.AspNetCore.Components.Web.RenderMode | ||
@using Microsoft.AspNetCore.Components.Web.Virtualization | ||
@using Microsoft.JSInterop | ||
@using Microsoft.Samples.Cosmos.NoSQL.Quickstart.Models | ||
@using Microsoft.Samples.Cosmos.NoSQL.Quickstart.Services.Interfaces | ||
@using Microsoft.Samples.Cosmos.NoSQL.Quickstart.Web | ||
@using Microsoft.Samples.Cosmos.NoSQL.Quickstart.Web.Components |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.