Skip to content

Commit fb44c80

Browse files
author
Dmitry Sikorsky
committed
Updated to use ExtCore 3.0.0-alpha1 and .NET Core 2.0.0
1 parent 3247fb6 commit fb44c80

12 files changed

Lines changed: 35 additions & 64 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Full-Featured ExtCore Framework 2.1.0 Sample Web Application
1+
# Full-Featured ExtCore Framework 3.0.0-alpha1 Sample Web Application
22

33
[![Join the chat at https://gitter.im/ExtCore/ExtCore](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ExtCore/ExtCore?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44

@@ -32,7 +32,7 @@ add direct dependencies to the main web application project instead, but it is n
3232
* [ExtCore framework 2.0.0 sample web application that uses the events](https://github.com/ExtCore/ExtCore-Sample-Events);
3333
* [ExtCore framework 2.0.0 sample API web application](https://github.com/ExtCore/ExtCore-Sample-Api).
3434

35-
You can also download our [ready to use full-featured sample](http://extcore.net/files/ExtCore-Sample-2.1.0.zip).
35+
You can also download our [ready to use full-featured sample](http://extcore.net/files/ExtCore-Sample-3.0.0-alpha1.zip).
3636
It contains everything you need to run ExtCore-based web application from Visual Studio 2017, including SQLite
3737
database with the test data.
3838

src/WebApplication.ExtensionA/WebApplication.ExtensionA.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22

33
<PropertyGroup>
44
<Authors>Dmitry Sikorsky</Authors>
5-
<TargetFramework>netstandard1.6</TargetFramework>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<EmbeddedResource Include="Styles\**;Views\**" />
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="ExtCore.Mvc.Infrastructure" Version="2.1.0" />
14-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
13+
<PackageReference Include="ExtCore.Mvc.Infrastructure" Version="3.0.0-alpha1" />
1514
</ItemGroup>
1615

1716
</Project>

src/WebApplication.ExtensionB.Data.Abstractions/WebApplication.ExtensionB.Data.Abstractions.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<Authors>Dmitry Sikorsky</Authors>
5-
<TargetFramework>netstandard1.6</TargetFramework>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="ExtCore.Data.Abstractions" Version="2.1.0" />
9+
<PackageReference Include="ExtCore.Data.Abstractions" Version="3.0.0-alpha1" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

src/WebApplication.ExtensionB.Data.Entities/WebApplication.ExtensionB.Data.Entities.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<Authors>Dmitry Sikorsky</Authors>
5-
<TargetFramework>netstandard1.6</TargetFramework>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="ExtCore.Data.Entities.Abstractions" Version="2.1.0" />
9+
<PackageReference Include="ExtCore.Data.Entities.Abstractions" Version="3.0.0-alpha1" />
1010
</ItemGroup>
1111

1212
</Project>

src/WebApplication.ExtensionB.Data.EntityFramework.Sqlite/EntityRegistrar.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void RegisterEntities(ModelBuilder modelBuilder)
1515
{
1616
etb.HasKey(e => e.Id);
1717
etb.Property(e => e.Id);
18-
etb.ForSqliteToTable("Items");
18+
etb.ToTable("Items");
1919
}
2020
);
2121
}

src/WebApplication.ExtensionB.Data.EntityFramework.Sqlite/WebApplication.ExtensionB.Data.EntityFramework.Sqlite.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
<PropertyGroup>
44
<Authors>Dmitry Sikorsky</Authors>
5-
<TargetFramework>netstandard1.6</TargetFramework>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="ExtCore.Data.EntityFramework.Sqlite" Version="2.1.0" />
9+
<PackageReference Include="ExtCore.Data.EntityFramework.Sqlite" Version="3.0.0-alpha1" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

src/WebApplication.ExtensionB/WebApplication.ExtensionB.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,19 @@
22

33
<PropertyGroup>
44
<Authors>Dmitry Sikorsky</Authors>
5-
<TargetFramework>netstandard1.6</TargetFramework>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<EmbeddedResource Include="Views\**" />
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<ProjectReference Include="..\WebApplication.ExtensionB.Data.Abstractions\WebApplication.ExtensionB.Data.Abstractions.csproj" />
13+
<PackageReference Include="ExtCore.Mvc.Infrastructure" Version="3.0.0-alpha1" />
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="ExtCore.Mvc.Infrastructure" Version="2.1.0" />
18-
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
17+
<ProjectReference Include="..\WebApplication.ExtensionB.Data.Abstractions\WebApplication.ExtensionB.Data.Abstractions.csproj" />
1918
</ItemGroup>
2019

2120
</Project>

src/WebApplication/Program.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

44
using System.IO;
5+
using Microsoft.AspNetCore;
56
using Microsoft.AspNetCore.Hosting;
67

78
namespace WebApplication
@@ -10,14 +11,15 @@ public class Program
1011
{
1112
public static void Main(string[] args)
1213
{
13-
var host = new WebHostBuilder()
14-
.UseContentRoot(Directory.GetCurrentDirectory())
15-
.UseKestrel()
16-
.UseIISIntegration()
17-
.UseStartup<Startup>()
18-
.Build();
19-
20-
host.Run();
14+
Program.BuildWebHost(args).Run();
2115
}
16+
17+
public static IWebHost BuildWebHost(string[] args) =>
18+
WebHost.CreateDefaultBuilder(args)
19+
.UseContentRoot(Directory.GetCurrentDirectory())
20+
.UseKestrel()
21+
.UseIISIntegration()
22+
.UseStartup<Startup>()
23+
.Build();
2224
}
2325
}

src/WebApplication/Startup.cs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
// Copyright © 2015 Dmitry Sikorsky. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
//using System;
54
using ExtCore.Data.EntityFramework;
65
using ExtCore.WebApplication.Extensions;
76
using Microsoft.AspNetCore.Builder;
87
using Microsoft.AspNetCore.Hosting;
9-
//using Microsoft.AspNetCore.Http;
10-
//using Microsoft.AspNetCore.Http.Headers;
118
using Microsoft.Extensions.Configuration;
129
using Microsoft.Extensions.DependencyInjection;
1310
using Microsoft.Extensions.Logging;
14-
//using Microsoft.Net.Http.Headers;
1511

1612
namespace WebApplication
1713
{
@@ -35,23 +31,6 @@ public Startup(IHostingEnvironment hostingEnvironment, ILoggerFactory loggerFact
3531
public void ConfigureServices(IServiceCollection services)
3632
{
3733
services.AddExtCore(this.extensionsPath, this.configurationRoot["Extensions:IncludingSubpaths"] == true.ToString());
38-
39-
/*
40-
services.Configure<StaticFileOptions>(options =>
41-
{
42-
options.OnPrepareResponse = (context) =>
43-
{
44-
ResponseHeaders headers = context.Context.Response.GetTypedHeaders();
45-
46-
headers.CacheControl = new CacheControlHeaderValue()
47-
{
48-
MaxAge = TimeSpan.FromSeconds(60),
49-
};
50-
};
51-
}
52-
);
53-
*/
54-
5534
services.Configure<StorageContextOptions>(options =>
5635
{
5736
options.ConnectionString = this.configurationRoot.GetConnectionString("Default");

src/WebApplication/WebApplication.csproj

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,14 @@
22

33
<PropertyGroup>
44
<Authors>Dmitry Sikorsky</Authors>
5-
<TargetFramework>netcoreapp1.1</TargetFramework>
5+
<TargetFramework>netcoreapp2.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="ExtCore.Data" Version="2.1.0" />
10-
<PackageReference Include="ExtCore.Data.EntityFramework.Sqlite" Version="2.1.0" />
11-
<PackageReference Include="ExtCore.Mvc" Version="2.1.0" />
12-
<PackageReference Include="ExtCore.WebApplication" Version="2.1.0" />
13-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.2" />
14-
<PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="1.1.2" />
15-
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.1" />
16-
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.2" />
17-
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
18-
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.2" />
19-
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
20-
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.2" />
9+
<PackageReference Include="ExtCore.Data" Version="3.0.0-alpha1" />
10+
<PackageReference Include="ExtCore.Data.EntityFramework.Sqlite" Version="3.0.0-alpha1" />
11+
<PackageReference Include="ExtCore.Mvc" Version="3.0.0-alpha1" />
12+
<PackageReference Include="ExtCore.WebApplication" Version="3.0.0-alpha1" />
2113
</ItemGroup>
2214

2315
</Project>

0 commit comments

Comments
 (0)