Renaming innermost project to ApplicationCore
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
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
|
||||
{
|
||||
@@ -51,8 +51,10 @@ namespace Microsoft.eShopWeb.Services
|
||||
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 });
|
||||
@@ -64,8 +66,10 @@ namespace Microsoft.eShopWeb.Services
|
||||
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 });
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.eShopWeb.Business.Entities;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Entities;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Microsoft.eShopWeb.ViewModels
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@model Microsoft.eShopWeb.Business.Entities.CatalogItem
|
||||
@model Microsoft.eShopWeb.ApplicationCore.Entities.CatalogItem
|
||||
|
||||
|
||||
<form asp-controller="Cart" asp-action="AddToCart">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<Folder Include="wwwroot\fonts\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Business\Business.csproj" />
|
||||
<ProjectReference Include="..\ApplicationCore\ApplicationCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user