Trim title

This commit is contained in:
Robert McRackan 2021-07-26 17:11:49 -04:00
parent b479096fc2
commit 9d00da006c
2 changed files with 3 additions and 6 deletions

View File

@ -88,8 +88,8 @@ namespace DataLayer
Category = category;
// simple assigns
Title = title;
Description = description;
Title = title.Trim();
Description = description.Trim();
LengthInMinutes = lengthInMinutes;
// assigns with biz logic

View File

@ -67,9 +67,6 @@ namespace DtoImporterService
{
var item = importItem.DtoItem;
//Add any subtitle after the title title.
var title = item.Title + (!string.IsNullOrWhiteSpace(item.Subtitle) ? $": {item.Subtitle}" : "");
// absence of authors is very rare, but possible
if (!item.Authors?.Any() ?? true)
item.Authors = new[] { new Person { Name = "", Asin = null } };
@ -105,7 +102,7 @@ namespace DtoImporterService
var book = DbContext.Books.Add(new Book(
new AudibleProductId(item.ProductId),
title,
item.TitleWithSubtitle,
item.Description,
item.LengthInMinutes,
authors,