-
Notifications
You must be signed in to change notification settings - Fork 0
/
Notes.txt
49 lines (42 loc) · 2.15 KB
/
Notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
1. Create a Blazor app from VS. Choose .Net Core option, it will create 3 projects int the
solution.
2. Follow this article to add the database support using efcore:https://www.codewithmukesh.com/blog/blazor-crud-with-entity-framework-core/
3. Create DataAccess folder in IMS.Server project
4. Create DataContext class in IMS.Server.DataAccess folder.
5. Install Microsoft.EntityframworkCore (turn off prerelease) and Microsoft.EntityFrameworkCore.Design
6. Install Polemy.EntityFrameworkCore.MySql package to access MySql
7. Make changes to startup.cs to link to the remote database as per this article: https://www.codewithmukesh.com/blog/blazor-crud-with-entity-framework-core/
8. Add a new Contoller in the Controllers folder (api controller)
9. <InputSelect> requires @bind-Value
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazored.Modal" Version="5.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.7" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="3.1.7" />
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\Resource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resource.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Resources\Resource.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Resource.ur.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>