consolidate projects, lots of minor tweaks

This commit is contained in:
Collin M. Barrett 2017-04-12 20:39:12 -05:00
parent 0ed7c2b80d
commit 304aede29f
20 changed files with 36 additions and 59 deletions

4
.gitignore vendored
View file

@ -289,6 +289,6 @@ __pycache__/
# FilterLists Custom Ignores
gs/Private.gs
api/FilterLists.Api/appsettings.Development.json
api/FilterLists.Api/appsettings.Production.json
api/src/FilterLists.Api/appsettings.Development.json
api/src/FilterLists.Api/appsettings.Production.json
api/FilterLists.Api/api.filterlists

View file

@ -7,18 +7,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Api", "src\Filt
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Data", "src\FilterLists.Data\FilterLists.Data.csproj", "{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Models", "src\FilterLists.Models\FilterLists.Models.csproj", "{EBEF0C2E-2631-4AEF-ACAF-F5AE5A568975}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Data.Contracts", "src\FilterLists.Data.Contracts\FilterLists.Data.Contracts.csproj", "{07A5064E-1CB9-4990-84F8-25A9A89B1D45}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Services", "src\FilterLists.Services\FilterLists.Services.csproj", "{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Services.Tests", "test\FilterLists.Services.Tests\FilterLists.Services.Tests.csproj", "{39072BBE-268D-408D-878F-1416F9C400A2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Data.Tests", "test\FilterLists.Data.Tests\FilterLists.Data.Tests.csproj", "{AE4E5758-92F3-4BFA-B71E-6A05F5E71FAC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Services.Contracts", "src\FilterLists.Services.Contracts\FilterLists.Services.Contracts.csproj", "{C001DB46-2DE7-40C1-B0F8-75E831C09E6C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E7590A2B-621D-47EA-B026-315793F0FE50}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2AD4EEF3-8372-4AE9-8B1C-25359EC87435}"
@ -37,14 +31,6 @@ Global
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}.Release|Any CPU.Build.0 = Release|Any CPU
{EBEF0C2E-2631-4AEF-ACAF-F5AE5A568975}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EBEF0C2E-2631-4AEF-ACAF-F5AE5A568975}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EBEF0C2E-2631-4AEF-ACAF-F5AE5A568975}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EBEF0C2E-2631-4AEF-ACAF-F5AE5A568975}.Release|Any CPU.Build.0 = Release|Any CPU
{07A5064E-1CB9-4990-84F8-25A9A89B1D45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{07A5064E-1CB9-4990-84F8-25A9A89B1D45}.Debug|Any CPU.Build.0 = Debug|Any CPU
{07A5064E-1CB9-4990-84F8-25A9A89B1D45}.Release|Any CPU.ActiveCfg = Release|Any CPU
{07A5064E-1CB9-4990-84F8-25A9A89B1D45}.Release|Any CPU.Build.0 = Release|Any CPU
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -57,10 +43,6 @@ Global
{AE4E5758-92F3-4BFA-B71E-6A05F5E71FAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE4E5758-92F3-4BFA-B71E-6A05F5E71FAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE4E5758-92F3-4BFA-B71E-6A05F5E71FAC}.Release|Any CPU.Build.0 = Release|Any CPU
{C001DB46-2DE7-40C1-B0F8-75E831C09E6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C001DB46-2DE7-40C1-B0F8-75E831C09E6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C001DB46-2DE7-40C1-B0F8-75E831C09E6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C001DB46-2DE7-40C1-B0F8-75E831C09E6C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -68,11 +50,8 @@ Global
GlobalSection(NestedProjects) = preSolution
{57E4CE18-41F3-48F6-B142-12947FFBA86C} = {E7590A2B-621D-47EA-B026-315793F0FE50}
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1} = {E7590A2B-621D-47EA-B026-315793F0FE50}
{EBEF0C2E-2631-4AEF-ACAF-F5AE5A568975} = {E7590A2B-621D-47EA-B026-315793F0FE50}
{07A5064E-1CB9-4990-84F8-25A9A89B1D45} = {E7590A2B-621D-47EA-B026-315793F0FE50}
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C} = {E7590A2B-621D-47EA-B026-315793F0FE50}
{39072BBE-268D-408D-878F-1416F9C400A2} = {2AD4EEF3-8372-4AE9-8B1C-25359EC87435}
{AE4E5758-92F3-4BFA-B71E-6A05F5E71FAC} = {2AD4EEF3-8372-4AE9-8B1C-25359EC87435}
{C001DB46-2DE7-40C1-B0F8-75E831C09E6C} = {E7590A2B-621D-47EA-B026-315793F0FE50}
EndGlobalSection
EndGlobal

View file

@ -15,7 +15,6 @@ public ListsController(IListService listService)
_listService = listService;
}
// GET lists
[HttpGet]
public IActionResult Get()
{

View file

@ -5,7 +5,7 @@ namespace FilterLists.Api.DependencyInjection.Extensions
{
public static class ConfigureServicesCollection
{
public static IServiceCollection RegisterFilterListsApi(this IServiceCollection services)
public static IServiceCollection AddFilterListsApi(this IServiceCollection services)
{
services.AddMvc()
.AddJsonOptions(options =>

View file

@ -25,7 +25,6 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FilterLists.Data\FilterLists.Data.csproj" />
<ProjectReference Include="..\FilterLists.Services.Contracts\FilterLists.Services.Contracts.csproj" />
<ProjectReference Include="..\FilterLists.Services\FilterLists.Services.csproj" />
</ItemGroup>
<ItemGroup>

View file

@ -25,9 +25,9 @@ public Startup(IHostingEnvironment env)
public void ConfigureServices(IServiceCollection services)
{
services.RegisterFilterListsRepositories(Configuration);
services.RegisterFilterListsServices();
services.RegisterFilterListsApi();
services.AddFilterListsRepositories(Configuration);
services.AddFilterListsServices();
services.AddFilterListsApi();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)

View file

@ -8,4 +8,9 @@
<ProjectReference Include="..\FilterLists.Models\FilterLists.Models.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Contexts\" />
<Folder Include="Repositories\" />
</ItemGroup>
</Project>

View file

@ -1,5 +1,4 @@
using FilterLists.Data.Contracts.Contexts;
using FilterLists.Models;
using FilterLists.Data.Models;
using Microsoft.EntityFrameworkCore;
namespace FilterLists.Data.Contexts

View file

@ -1,4 +1,4 @@
namespace FilterLists.Data.Contracts.Contexts
namespace FilterLists.Data.Contexts
{
public interface IFilterListsDbContext
{

View file

@ -1,6 +1,6 @@
using FilterLists.Data.Contexts;
using FilterLists.Data.Contracts.Repositories;
using FilterLists.Data.Repositories;
using FilterLists.Data.Repositories.Contracts;
using FilterLists.Data.Repositories.Implementations;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
@ -11,7 +11,7 @@ namespace FilterLists.Data.DependencyInjection.Extensions
{
public static class ConfigureServicesCollection
{
public static IServiceCollection RegisterFilterListsRepositories(this IServiceCollection services,
public static IServiceCollection AddFilterListsRepositories(this IServiceCollection services,
IConfiguration configuration)
{
services.AddSingleton(c => configuration);

View file

@ -9,13 +9,14 @@
<PackageReference Include="SapientGuardian.EntityFrameworkCore.MySql" Version="7.1.23" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FilterLists.Data.Contracts\FilterLists.Data.Contracts.csproj" />
<ProjectReference Include="..\FilterLists.Models\FilterLists.Models.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Stored Procedures\" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Runtime">
<HintPath>..\..\..\..\..\.nuget\packages\system.runtime\4.3.0\ref\netstandard1.5\System.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

View file

@ -5,7 +5,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FilterLists.Models
namespace FilterLists.Data.Models
{
public abstract class BaseEntity
{

View file

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace FilterLists.Models
namespace FilterLists.Data.Models
{
public class List : BaseEntity
{

View file

@ -1,7 +1,7 @@
using System.Collections.Generic;
using FilterLists.Models;
using FilterLists.Data.Models;
namespace FilterLists.Data.Contracts.Repositories
namespace FilterLists.Data.Repositories.Contracts
{
public interface IListRepository
{

View file

@ -1,10 +1,10 @@
using System.Collections.Generic;
using System.Linq;
using FilterLists.Data.Contexts;
using FilterLists.Data.Contracts.Repositories;
using FilterLists.Models;
using FilterLists.Data.Models;
using FilterLists.Data.Repositories.Contracts;
namespace FilterLists.Data.Repositories
namespace FilterLists.Data.Repositories.Implementations
{
public class ListRepository : IListRepository
{

View file

@ -4,8 +4,4 @@
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\FilterLists.Models\FilterLists.Models.csproj" />
</ItemGroup>
</Project>

View file

@ -1,5 +1,5 @@
using System.Collections.Generic;
using FilterLists.Models;
using FilterLists.Data.Models;
namespace FilterLists.Services.Contracts
{

View file

@ -1,4 +1,5 @@
using FilterLists.Services.Contracts;
using FilterLists.Services.Implementations;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
@ -6,7 +7,7 @@ namespace FilterLists.Services.DependencyInjection.Extensions
{
public static class ConfigureServicesCollection
{
public static IServiceCollection RegisterFilterListsServices(this IServiceCollection services)
public static IServiceCollection AddFilterListsServices(this IServiceCollection services)
{
services.TryAddScoped<IListService, ListService>();
return services;

View file

@ -9,9 +9,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FilterLists.Data.Contracts\FilterLists.Data.Contracts.csproj" />
<ProjectReference Include="..\FilterLists.Models\FilterLists.Models.csproj" />
<ProjectReference Include="..\FilterLists.Services.Contracts\FilterLists.Services.Contracts.csproj" />
<ProjectReference Include="..\FilterLists.Data\FilterLists.Data.csproj" />
</ItemGroup>
</Project>

View file

@ -1,9 +1,9 @@
using System.Collections.Generic;
using FilterLists.Data.Contracts.Repositories;
using FilterLists.Models;
using FilterLists.Data.Models;
using FilterLists.Data.Repositories.Contracts;
using FilterLists.Services.Contracts;
namespace FilterLists.Services
namespace FilterLists.Services.Implementations
{
public class ListService : IListService
{