Moving entity models to Business project

This commit is contained in:
Steve Smith
2017-03-22 21:04:39 -04:00
parent 884f7c0cfb
commit c9a69a3105
14 changed files with 25 additions and 49 deletions

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.4</TargetFramework>

View File

@@ -0,0 +1,8 @@
namespace Microsoft.eShopWeb.Business.Entities
{
public class CatalogBrand
{
public int Id { get; set; }
public string Brand { get; set; }
}
}

View File

@@ -1,6 +1,4 @@
using System;
namespace Microsoft.eShopWeb.Models
namespace Microsoft.eShopWeb.Business.Entities
{
public class CatalogItem
{

View File

@@ -0,0 +1,9 @@
namespace Microsoft.eShopWeb.Business.Entities
{
public class CatalogType
{
public int Id { get; set; }
public string Type { get; set; }
}
}

View File

@@ -1,3 +0,0 @@
*
!obj/Docker/publish/*
!obj/Docker/empty/

View File

@@ -1,6 +0,0 @@
FROM microsoft/aspnetcore:1.1
ARG source
WORKDIR /app
EXPOSE 80
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["dotnet", "eShopWeb.dll"]

View File

@@ -1,8 +1,8 @@
namespace Microsoft.eShopWeb.Infrastructure
{
using eShopWeb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.eShopWeb.Business.Entities;
public class CatalogContext : DbContext
{

View File

@@ -1,8 +1,8 @@
namespace Microsoft.eShopWeb.Infrastructure
{
using eShopWeb.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.EntityFrameworkCore;
using Microsoft.eShopWeb.Business.Entities;
using Microsoft.Extensions.Logging;
using System;
using System.Collections.Generic;

View File

@@ -1,15 +0,0 @@
namespace Microsoft.eShopWeb.Models
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
public class CatalogBrand
{
public int Id { get; set; }
public string Brand { get; set; }
}
}

View File

@@ -1,14 +0,0 @@
namespace Microsoft.eShopWeb.Models
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
public class CatalogType
{
public int Id { get; set; }
public string Type { get; set; }
}
}

View File

@@ -1,12 +1,12 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.eShopWeb.Models;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Microsoft.eShopWeb.Infrastructure;
using Microsoft.eShopWeb.ViewModels;
using Microsoft.eShopWeb.Business.Entities;
namespace Microsoft.eShopWeb.Services
{

View File

@@ -1,4 +1,4 @@
using Microsoft.eShopWeb.Models;
using Microsoft.eShopWeb.Business.Entities;
using System.Collections.Generic;
namespace Microsoft.eShopWeb.ViewModels

View File

@@ -1,5 +1,5 @@
using Microsoft.eShopWeb.Models;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.eShopWeb.Business.Entities;
using System.Collections.Generic;
namespace Microsoft.eShopWeb.ViewModels

View File

@@ -28,7 +28,6 @@
<DotNetCliToolReference Include="Microsoft.EntityFrameworkCore.Tools.DotNet" Version="1.0.0-msbuild3-final" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\" />
<Folder Include="Pics\" />
<Folder Include="Views\Catalog\" />
<Folder Include="wwwroot\css\catalog\" />