Trim title
This commit is contained in:
parent
b479096fc2
commit
9d00da006c
@ -88,8 +88,8 @@ namespace DataLayer
|
|||||||
Category = category;
|
Category = category;
|
||||||
|
|
||||||
// simple assigns
|
// simple assigns
|
||||||
Title = title;
|
Title = title.Trim();
|
||||||
Description = description;
|
Description = description.Trim();
|
||||||
LengthInMinutes = lengthInMinutes;
|
LengthInMinutes = lengthInMinutes;
|
||||||
|
|
||||||
// assigns with biz logic
|
// assigns with biz logic
|
||||||
|
|||||||
@ -67,9 +67,6 @@ namespace DtoImporterService
|
|||||||
{
|
{
|
||||||
var item = importItem.DtoItem;
|
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
|
// absence of authors is very rare, but possible
|
||||||
if (!item.Authors?.Any() ?? true)
|
if (!item.Authors?.Any() ?? true)
|
||||||
item.Authors = new[] { new Person { Name = "", Asin = null } };
|
item.Authors = new[] { new Person { Name = "", Asin = null } };
|
||||||
@ -105,7 +102,7 @@ namespace DtoImporterService
|
|||||||
|
|
||||||
var book = DbContext.Books.Add(new Book(
|
var book = DbContext.Books.Add(new Book(
|
||||||
new AudibleProductId(item.ProductId),
|
new AudibleProductId(item.ProductId),
|
||||||
title,
|
item.TitleWithSubtitle,
|
||||||
item.Description,
|
item.Description,
|
||||||
item.LengthInMinutes,
|
item.LengthInMinutes,
|
||||||
authors,
|
authors,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user