Refactoring and Adding Tests (#28)

* Introducing repository and refactoring services.
Changing entities to use int keys everywhere.

* Refactoring application services to live in web project and only reference repositories, not EF contexts.

* Cleaning up implementations

* Moving logic out of CatalogController
Moving entity knowledge out of viewmodels.

* Implementing specification includes better for catalogservice

* Cleaning up and adding specification unit tests
This commit is contained in:
Steve Smith
2017-08-07 13:25:11 -04:00
committed by GitHub
parent 084db74c77
commit d7eb59c097
41 changed files with 449 additions and 360 deletions

View File

@@ -7,10 +7,8 @@ namespace ApplicationCore.Services
{
private readonly CatalogSettings _catalogSettings;
public UriComposer(CatalogSettings catalogSettings)
{
_catalogSettings = catalogSettings;
}
public UriComposer(CatalogSettings catalogSettings) => _catalogSettings = catalogSettings;
public string ComposePicUri(string uriTemplate)
{
return uriTemplate.Replace("http://catalogbaseurltobereplaced", _catalogSettings.CatalogBaseUrl);