cleanup nullable dates from last

This commit is contained in:
Collin M. Barrett 2018-08-15 13:51:32 -05:00
parent 83a6e9a840
commit c0ad950bbe
4 changed files with 4 additions and 8 deletions

View file

@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Linq;
using AutoMapper;
using FilterLists.Services.FilterList.Models;
using JetBrains.Annotations;
@ -28,7 +27,6 @@ public ListDetailsDtoMappingProfile() =>
.Where(s => s.AddedSnapshotRules.Count > 0 || s.RemovedSnapshotRules.Count > 0)
.OrderByDescending(s => s.CreatedDateUtc)
.Select(s => s.CreatedDateUtc)
.Cast<DateTime?>()
.FirstOrDefault()));
}
}

View file

@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Linq;
using AutoMapper;
using FilterLists.Services.FilterList.Models;
using JetBrains.Annotations;
@ -19,7 +18,6 @@ public ListSummaryDtoMappingProfile() =>
.Where(s => s.AddedSnapshotRules.Count > 0 || s.RemovedSnapshotRules.Count > 0)
.OrderByDescending(s => s.CreatedDateUtc)
.Select(s => s.CreatedDateUtc)
.Cast<DateTime?>()
.FirstOrDefault()));
}
}

View file

@ -8,7 +8,7 @@ namespace FilterLists.Services.FilterList.Models
public class ListDetailsDto
{
public uint Id { get; set; }
public DateTime AddedDate { get; set; }
public DateTime? AddedDate { get; set; }
public string ChatUrl { get; set; }
public string Description { get; set; }
public string DescriptionSourceUrl { get; set; }

View file

@ -8,7 +8,7 @@ namespace FilterLists.Services.FilterList.Models
public class ListSummaryDto
{
public uint Id { get; set; }
public DateTime AddedDate { get; set; }
public DateTime? AddedDate { get; set; }
public IEnumerable<ListLanguagesDto> Languages { get; set; }
public string Name { get; set; }
public DateTime? UpdatedDate { get; set; }