Skip to content

Commit

Permalink
Renaming innermost project to ApplicationCore
Browse files Browse the repository at this point in the history
  • Loading branch information
ardalis committed Mar 23, 2017
1 parent d48d8bf commit c871497
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 28 deletions.
12 changes: 6 additions & 6 deletions eShopOnWeb.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "src\Infra
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "src\Web\Web.csproj", "{9CB6566E-E86A-4C07-BB8D-E0B95BCD4BD2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Business", "src\Business\Business.csproj", "{A81FBFCF-757E-4E38-BD15-A9C4DC3A68C0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ApplicationCore", "src\ApplicationCore\ApplicationCore.csproj", "{7FED7440-2311-4D1E-958B-3E887C585CD2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -25,17 +25,17 @@ Global
{9CB6566E-E86A-4C07-BB8D-E0B95BCD4BD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CB6566E-E86A-4C07-BB8D-E0B95BCD4BD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CB6566E-E86A-4C07-BB8D-E0B95BCD4BD2}.Release|Any CPU.Build.0 = Release|Any CPU
{A81FBFCF-757E-4E38-BD15-A9C4DC3A68C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A81FBFCF-757E-4E38-BD15-A9C4DC3A68C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A81FBFCF-757E-4E38-BD15-A9C4DC3A68C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A81FBFCF-757E-4E38-BD15-A9C4DC3A68C0}.Release|Any CPU.Build.0 = Release|Any CPU
{7FED7440-2311-4D1E-958B-3E887C585CD2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7FED7440-2311-4D1E-958B-3E887C585CD2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7FED7440-2311-4D1E-958B-3E887C585CD2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7FED7440-2311-4D1E-958B-3E887C585CD2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{7C461394-ABDC-43CD-A798-71249C58BA67} = {419A6ACE-0419-4315-A6FB-B0E63D39432E}
{9CB6566E-E86A-4C07-BB8D-E0B95BCD4BD2} = {419A6ACE-0419-4315-A6FB-B0E63D39432E}
{A81FBFCF-757E-4E38-BD15-A9C4DC3A68C0} = {419A6ACE-0419-4315-A6FB-B0E63D39432E}
{7FED7440-2311-4D1E-958B-3E887C585CD2} = {419A6ACE-0419-4315-A6FB-B0E63D39432E}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Folder Include="Interfaces\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.Business.Entities
namespace Microsoft.eShopWeb.ApplicationCore.Entities
{
public class BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.Business.Entities
namespace Microsoft.eShopWeb.ApplicationCore.Entities
{
public class CatalogBrand : BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.Business.Entities
namespace Microsoft.eShopWeb.ApplicationCore.Entities
{
public class CatalogItem : BaseEntity
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Microsoft.eShopWeb.Business.Entities
namespace Microsoft.eShopWeb.ApplicationCore.Entities
{
public class CatalogType : BaseEntity
{
Expand Down
4 changes: 0 additions & 4 deletions src/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@
<TargetFramework>netstandard1.4</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Business\Business.csproj" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions src/Web/Infrastructure/CatalogContext.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Microsoft.eShopWeb.Infrastructure
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.eShopWeb.ApplicationCore.Entities;
namespace Microsoft.eShopWeb.Infrastructure
{
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.eShopWeb.Business.Entities;

public class CatalogContext : DbContext
{
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Infrastructure/CatalogContextSeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
using Microsoft.AspNetCore.Builder;
using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.Business.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;
Expand Down
14 changes: 9 additions & 5 deletions src/Web/Services/CatalogService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.Extensions.Options;
using Microsoft.eShopWeb.Infrastructure;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Business.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities;

namespace Microsoft.eShopWeb.Services
{
Expand Down Expand Up @@ -51,8 +51,10 @@ public async Task<Catalog> GetCatalogItems(int pageIndex, int itemsPage, int? br
public async Task<IEnumerable<SelectListItem>> GetBrands()
{
var brands = await _context.CatalogBrands.ToListAsync();
var items = new List<SelectListItem>();
items.Add(new SelectListItem() { Value = null, Text = "All", Selected = true });
var items = new List<SelectListItem>
{
new SelectListItem() { Value = null, Text = "All", Selected = true }
};
foreach (CatalogBrand brand in brands)
{
items.Add(new SelectListItem() { Value = brand.Id.ToString(), Text = brand.Brand });
Expand All @@ -64,8 +66,10 @@ public async Task<IEnumerable<SelectListItem>> GetBrands()
public async Task<IEnumerable<SelectListItem>> GetTypes()
{
var types = await _context.CatalogTypes.ToListAsync();
var items = new List<SelectListItem>();
items.Add(new SelectListItem() { Value = null, Text = "All", Selected = true });
var items = new List<SelectListItem>
{
new SelectListItem() { Value = null, Text = "All", Selected = true }
};
foreach (CatalogType type in types)
{
items.Add(new SelectListItem() { Value = type.Id.ToString(), Text = type.Type });
Expand Down
2 changes: 1 addition & 1 deletion src/Web/ViewModels/Catalog.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.eShopWeb.Business.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Collections.Generic;

namespace Microsoft.eShopWeb.ViewModels
Expand Down
2 changes: 1 addition & 1 deletion src/Web/ViewModels/CatalogIndex.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.eShopWeb.Business.Entities;
using Microsoft.eShopWeb.ApplicationCore.Entities;
using System.Collections.Generic;

namespace Microsoft.eShopWeb.ViewModels
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Views/Catalog/_product.cshtml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@model Microsoft.eShopWeb.Business.Entities.CatalogItem
@model Microsoft.eShopWeb.ApplicationCore.Entities.CatalogItem


<form asp-controller="Cart" asp-action="AddToCart">
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<Folder Include="wwwroot\fonts\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Business\Business.csproj" />
<ProjectReference Include="..\ApplicationCore\ApplicationCore.csproj" />
</ItemGroup>

</Project>

0 comments on commit c871497

Please sign in to comment.