diff --git a/Web/Data/WeatherForecast.cs b/Web/Data/WeatherForecast.cs deleted file mode 100644 index 87a7fe6..0000000 --- a/Web/Data/WeatherForecast.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; - -namespace Web.Data -{ - public class WeatherForecast - { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int) (TemperatureC / 0.5556); - - public string Summary { get; set; } - } -} \ No newline at end of file diff --git a/Web/Data/WeatherForecastService.cs b/Web/Data/WeatherForecastService.cs deleted file mode 100644 index 45f5312..0000000 --- a/Web/Data/WeatherForecastService.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Linq; -using System.Threading.Tasks; - -namespace Web.Data -{ - public class WeatherForecastService - { - private static readonly string[] Summaries = new[] - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - public Task GetForecastAsync(DateTime startDate) - { - var rng = new Random(); - return Task.FromResult(Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - Date = startDate.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }).ToArray()); - } - } -} \ No newline at end of file diff --git a/Web/Pages/Counter.razor b/Web/Pages/Counter.razor deleted file mode 100644 index 8684a6c..0000000 --- a/Web/Pages/Counter.razor +++ /dev/null @@ -1,17 +0,0 @@ -@page "/counter" - -

Counter

- -

Current count: @currentCount

- - - -@code { - private int currentCount = 0; - - private void IncrementCount() - { - currentCount++; - } - -} \ No newline at end of file diff --git a/Web/Pages/CreateServer.razor b/Web/Pages/CreateServer.razor new file mode 100644 index 0000000..b8729b2 --- /dev/null +++ b/Web/Pages/CreateServer.razor @@ -0,0 +1,6 @@ +@page "/CreateServer" +

Create Server

+ +@code { + +} \ No newline at end of file diff --git a/Web/Pages/FetchData.razor b/Web/Pages/FetchData.razor deleted file mode 100644 index c666d36..0000000 --- a/Web/Pages/FetchData.razor +++ /dev/null @@ -1,49 +0,0 @@ -@page "/fetchdata" - -@using Web.Data -@inject WeatherForecastService ForecastService - -

Weather forecast

- -

This component demonstrates fetching data from a service.

- -@if (forecasts == null) -{ -

- Loading... -

-} -else -{ - - - - - - - - - - - @foreach (var forecast in forecasts) - { - - - - - - - } - -
DateTemp. (C)Temp. (F)Summary
@forecast.Date.ToShortDateString()@forecast.TemperatureC@forecast.TemperatureF@forecast.Summary
-} - -@code { - private WeatherForecast[] forecasts; - - protected override async Task OnInitializedAsync() - { - forecasts = await ForecastService.GetForecastAsync(DateTime.Now); - } - -} \ No newline at end of file diff --git a/Web/Pages/Index.razor b/Web/Pages/Index.razor index eabc005..64a40ca 100644 --- a/Web/Pages/Index.razor +++ b/Web/Pages/Index.razor @@ -1,7 +1,3 @@ @page "/" -

Hello, world!

- -Welcome to your new app. - - \ No newline at end of file +

Hello, world!

\ No newline at end of file diff --git a/Web/Pages/Login.razor b/Web/Pages/Login.razor new file mode 100644 index 0000000..6be4753 --- /dev/null +++ b/Web/Pages/Login.razor @@ -0,0 +1,6 @@ +@page "/Login" +

Login

+ +@code { + +} \ No newline at end of file diff --git a/Web/Shared/NavMenu.razor b/Web/Shared/NavMenu.razor index ef7ec78..f9cfff7 100644 --- a/Web/Shared/NavMenu.razor +++ b/Web/Shared/NavMenu.razor @@ -13,13 +13,8 @@ - diff --git a/Web/Startup.cs b/Web/Startup.cs index dee8c73..f09d8dd 100644 --- a/Web/Startup.cs +++ b/Web/Startup.cs @@ -9,7 +9,6 @@ using Microsoft.AspNetCore.HttpsPolicy; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Web.Data; namespace Web { @@ -28,7 +27,6 @@ namespace Web { services.AddRazorPages(); services.AddServerSideBlazor(); - services.AddSingleton(); } // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. diff --git a/Web/Web.csproj b/Web/Web.csproj index f685184..b7b70cb 100644 --- a/Web/Web.csproj +++ b/Web/Web.csproj @@ -4,4 +4,12 @@ net5.0 + + + + + + + +