Skip to content

Commit 6d8da0b

Browse files
committed
Update Nuget version to 4.0.0
1 parent 20f5c9a commit 6d8da0b

File tree

6 files changed

+24
-30
lines changed

6 files changed

+24
-30
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>netstandard2.1</TargetFramework>
3+
<TargetFramework>net6.0</TargetFramework>
4+
<StartupObject />
45
</PropertyGroup>
56
<ItemGroup>
6-
<PackageReference Include="DWNet.Data" Version="3.1.0-beta2" />
7-
<PackageReference Include="SnapObjects.Data.AspNetCore" Version="3.1.0-beta2" />
8-
<PackageReference Include="SnapObjects.Data.SqlServer" Version="3.1.0-beta2" />
7+
<PackageReference Include="DWNet.Data" Version="4.0.0" />
8+
<PackageReference Include="SnapObjects.Data.AspNetCore" Version="4.0.0" />
9+
<PackageReference Include="SnapObjects.Data.SqlServer" Version="4.0.0" />
910
</ItemGroup>
1011
</Project>
Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
2-
32
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<TargetFramework>net6.0</TargetFramework>
54
</PropertyGroup>
6-
7-
<ItemGroup>
8-
<Compile Remove="Pages\NewFolder\**" />
9-
<Content Remove="Pages\NewFolder\**" />
10-
<EmbeddedResource Remove="Pages\NewFolder\**" />
11-
<None Remove="Pages\NewFolder\**" />
12-
</ItemGroup>
13-
14-
<ItemGroup>
15-
<ProjectReference Include="..\Appeon.DataStoreDemo.Service.SqlServer\Appeon.DataStoreDemo.Service.SqlServer.csproj" />
16-
</ItemGroup>
17-
5+
<ItemGroup>
6+
<Compile Remove="Pages\NewFolder\**" />
7+
<Content Remove="Pages\NewFolder\**" />
8+
<EmbeddedResource Remove="Pages\NewFolder\**" />
9+
<None Remove="Pages\NewFolder\**" />
10+
</ItemGroup>
11+
<ItemGroup>
12+
<ProjectReference Include="..\Appeon.DataStoreDemo.Service.SqlServer\Appeon.DataStoreDemo.Service.SqlServer.csproj" />
13+
</ItemGroup>
1814
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
1915
<TypeScriptTarget>ES5</TypeScriptTarget>
2016
<TypeScriptJSXEmit>None</TypeScriptJSXEmit>
@@ -30,11 +26,8 @@
3026
<TypeScriptMapRoot />
3127
<TypeScriptSourceRoot />
3228
</PropertyGroup>
33-
34-
3529
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
3630
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
3731
<WarningsAsErrors />
3832
</PropertyGroup>
39-
40-
</Project>
33+
</Project>

Appeon.DataStoreDemo.Web/Models/BasePageModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected void ConvertData(SalesOrder SalesOrder)
3737
String dueDate = this.Request.Form["SalesOrder.DueDate"];
3838
String shipDate = this.Request.Form["SalesOrder.ShipDate"];
3939

40-
if (!String.IsNullOrEmpty(orderDate) && SalesOrder.OrderDate == null)
40+
if (!String.IsNullOrEmpty(orderDate))
4141
{
4242
try
4343
{
@@ -49,7 +49,7 @@ protected void ConvertData(SalesOrder SalesOrder)
4949
{
5050
}
5151
}
52-
if (!String.IsNullOrEmpty(dueDate) && SalesOrder.DueDate == null)
52+
if (!String.IsNullOrEmpty(dueDate))
5353
{
5454
try
5555
{

Appeon.DataStoreDemo.Web/Pages/SalesOrders/Create.cshtml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ private async Task LoadDataAsync()
6666

6767
await QueryOrderProductsAsync();
6868
}
69-
catch (Exception e)
69+
catch (Exception)
7070
{
71-
throw e;
71+
throw;
7272
}
7373
}
7474

Appeon.DataStoreDemo.Web/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
}
88
},
99
"ConnectionStrings": {
10-
"AdventureWorks2012": "Data Source=127.0.0.1;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sa;Password=123456;Pooling=True;Min Pool Size=0;Max Pool Size=100;ApplicationIntent=ReadWrite"
10+
"AdventureWorks2012": "Data Source=127.0.0.1;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sa;Password=12345;Pooling=True;Min Pool Size=0;Max Pool Size=100;ApplicationIntent=ReadWrite;;Trust Server Certificate=True"
1111
}
1212
}

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This ASP.NET Core project makes use of the Razor page, and reference to a Class
44

55
##### Project Structure
66

7-
The project contains an ASP.Net Core Web Application project. it is implemented using [Razor Pages](https://docs.microsoft.com/aspnet/core/razor-pages/?view=aspnetcore-3.1&tabs=visual-studio).
7+
The project contains an ASP.Net Core Web Application project. it is implemented using [Razor Pages](https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-6.0&tabs=visual-studio).
88

99
The project is structured as follows.
1010

@@ -23,15 +23,15 @@ The project is structured as follows.
2323

2424
1. Download the project and save it to your local directory.
2525

26-
2. Open the *DataStore-Asp.NetCore-Example.sln* solution in Visual Studio 2019 or another C# development IDE.
26+
2. Open the *DataStore-Asp.NetCore-Example.sln* solution in Visual Studio 2022 or another C# development IDE.
2727

2828
3. Download the SQL Server database backup file from [.NET-Project-Example-Database](https://github.com/Appeon/.NET-Project-Example-Database), and restore the database using the downloaded database backup file.
2929

3030
4. Open the configuration file *appsettings.json* in the *Appeon.DataStoreDemo.Web* project, modify the ConnectionStrings with the SQL Server database connection information.
3131

3232
```json
3333
//Keep the database connection name as the default “AdventureWorks2012” or change it to a name you prefer to use, and change the Data Source, User ID, Password and Initial Catalog according to the actual settings
34-
"ConnectionStrings": { "AdventureWorks2012": "Data Source=127.0.0.1; Initial Catalog=AdventureWorks; Integrated Security=False; User ID=sa; Password=123456; Pooling=True; Min Pool Size=0; Max Pool Size=100; ApplicationIntent=ReadWrite" }
34+
"ConnectionStrings": { "AdventureWorks2012": "Data Source=127.0.0.1; Initial Catalog=AdventureWorks; Integrated Security=False; User ID=sa; Password=123456; Pooling=True; Min Pool Size=0; Max Pool Size=100; ApplicationIntent=ReadWrite;Trust Server Certificate=True" }
3535
```
3636

3737
5. In the ConfigureServices method of *Startup.cs*, go to the following line, and make sure the ConnectionString name is the same as the database connection name specified in step #4.

0 commit comments

Comments
 (0)