Skip to content

Commit f668bcf

Browse files
Changes done
1 parent 27d1e04 commit f668bcf

File tree

12 files changed

+61
-68
lines changed

12 files changed

+61
-68
lines changed

App.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Router AppAssembly="@typeof(Program).Assembly">
1+
<Router AppAssembly="@typeof(Program).Assembly">
22
<Found Context="routeData">
33
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
44
</Found>

My-WebAssembly-App.csproj

Lines changed: 0 additions & 16 deletions
This file was deleted.

My-WebAssembly-App.csproj.user

Lines changed: 0 additions & 6 deletions
This file was deleted.

Pages/Index.razor

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,33 @@ Welcome to your new app.
66

77
<SurveyPrompt Title="How is Blazor working for you?" />
88

9-
<EjsCalendar TValue="DateTime?"></EjsCalendar>
9+
<SfCalendar TValue="DateTime?"></SfCalendar>
1010
<br/>
11-
<EjsGrid DataSource="@EmployeeData"></EjsGrid>
11+
<SfGrid DataSource="@EmployeeData"></SfGrid>
1212

1313
@code{
1414
public class Employee
15+
{
16+
public int EmployeeID { get; set; }
17+
public string Name { get; set; }
18+
public string Designation { get; set; }
19+
public DateTime DOJ { get; set; }
20+
public double Salary { get; set; }
21+
}
22+
23+
public List<Employee> EmployeeData { get; set; }
24+
25+
protected override void OnInitialized()
26+
{
27+
EmployeeData = Enumerable.Range(1, 75).Select(x => new Employee()
1528
{
16-
public int EmployeeID { get; set; }
17-
public string Name { get; set; }
18-
public string Designation { get; set; }
19-
public DateTime DOJ { get; set; }
20-
public double Salary { get; set; }
21-
}
22-
public List<Employee> EmployeeData { get; set; }
23-
24-
protected override void OnInitialized()
25-
{
26-
EmployeeData = Enumerable.Range(1, 75).Select(x => new Employee()
27-
{
28-
EmployeeID = 1000 + x,
29-
Name = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
30-
Designation = (new string[] { "CMBKIO", "ERIOPL", "EWOPHL", "WWIOPPS", "MLOPSSJ" })[new Random().Next(5)],
31-
DOJ = DateTime.Now.AddDays(-x),
32-
Salary = 20000 * x
33-
}).ToList();
34-
}
29+
EmployeeID = 1000 + x,
30+
Name = (new string[] { "ALFKI", "ANANTR", "ANTON", "BLONP", "BOLID" })[new Random().Next(5)],
31+
Designation = (new string[] { "CMBKIO", "ERIOPL", "EWOPHL", "WWIOPPS", "MLOPSSJ" })[new Random().Next(5)],
32+
DOJ = DateTime.Now.AddDays(-x),
33+
Salary = 20000 * x
34+
}).ToList();
35+
}
3536

36-
}
3737

38+
}

Program.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Threading.Tasks;
44
using System.Text;
5-
using Microsoft.AspNetCore.Blazor.Hosting;
5+
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
66
using Microsoft.Extensions.DependencyInjection;
7-
using Syncfusion.EJ2.Blazor;
7+
using Syncfusion.Blazor;
88

9-
namespace My_WebAssembly_App
9+
namespace my_blazor_app
1010
{
1111
public class Program
1212
{
1313
public static async Task Main(string[] args)
1414
{
15-
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Add your license key here.");
15+
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("Use your License Key here.");
1616
var builder = WebAssemblyHostBuilder.CreateDefault(args);
1717
builder.RootComponents.Add<App>("app");
18+
19+
builder.Services.AddBaseAddressHttpClient();
1820
builder.Services.AddSyncfusionBlazor();
1921
await builder.Build().RunAsync();
2022
}

Properties/launchSettings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"windowsAuthentication": false,
44
"anonymousAuthentication": true,
55
"iisExpress": {
6-
"applicationUrl": "http://localhost:52743/",
7-
"sslPort": 44393
6+
"applicationUrl": "http://localhost:8573",
7+
"sslPort": 44391
88
}
99
},
1010
"profiles": {
@@ -15,13 +15,13 @@
1515
"ASPNETCORE_ENVIRONMENT": "Development"
1616
}
1717
},
18-
"My-WebAssembly-App": {
18+
"my-blazor-app": {
1919
"commandName": "Project",
2020
"launchBrowser": true,
21+
"applicationUrl": "https://localhost:5001;http://localhost:5000",
2122
"environmentVariables": {
2223
"ASPNETCORE_ENVIRONMENT": "Development"
23-
},
24-
"applicationUrl": "https://localhost:5001;http://localhost:5000"
24+
}
2525
}
2626
}
27-
}
27+
}

Shared/NavMenu.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div class="top-row pl-4 navbar navbar-dark">
2-
<a class="navbar-brand" href="">My-WebAssembly-App</a>
2+
<a class="navbar-brand" href="">my-blazor-app</a>
33
<button class="navbar-toggler" @onclick="ToggleNavMenu">
44
<span class="navbar-toggler-icon"></span>
55
</button>

Shared/SurveyPrompt.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<span class="text-nowrap">
66
Please take our
7-
<a target="_blank" class="font-weight-bold" href="https://go.microsoft.com/fwlink/?linkid=2116045">brief survey</a>
7+
<a target="_blank" class="font-weight-bold" href="https://go.microsoft.com/fwlink/?linkid=2121313">brief survey</a>
88
</span>
99
and tell us what you think.
1010
</div>

_Imports.razor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@using Microsoft.AspNetCore.Components.Routing
44
@using Microsoft.AspNetCore.Components.Web
55
@using Microsoft.JSInterop
6-
@using My_WebAssembly_App
7-
@using My_WebAssembly_App.Shared
8-
@using Syncfusion.EJ2.Blazor.Calendars
9-
@using Syncfusion.EJ2.Blazor.Grids
6+
@using my_blazor_app
7+
@using my_blazor_app.Shared
8+
@using Syncfusion.Blazor.Calendars
9+
@using Syncfusion.Blazor.Grids

my-blazor-app.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.1</TargetFramework>
5+
<RazorLangVersion>3.0</RazorLangVersion>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.0-preview2.20160.5" />
10+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="3.2.0-preview2.20160.5" PrivateAssets="all" />
11+
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="3.2.0-preview2.20160.5" PrivateAssets="all" />
12+
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="3.2.0-preview2.20160.5" />
13+
<PackageReference Include="Syncfusion.Blazor" Version="18.1.0.36-beta" />
14+
</ItemGroup>
15+
</Project>

0 commit comments

Comments
 (0)