Sort machines in admin page.

This commit is contained in:
2019-05-18 21:47:50 +01:00
parent d1082cc4b9
commit b916bcedfa
8 changed files with 136 additions and 103 deletions

View File

@@ -30,6 +30,8 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
namespace Cicm.Database.Models
{
@@ -59,5 +61,10 @@ namespace Cicm.Database.Models
public virtual ICollection<ProcessorsByMachine> Processors { get; set; }
public virtual ICollection<SoundByMachine> Sound { get; set; }
public virtual ICollection<StorageByMachine> Storage { get; set; }
[NotMapped]
[DisplayName("Introduced")]
public string IntroducedView =>
Introduced == DateTime.MinValue ? "Prototype" : Introduced?.ToShortDateString() ?? "Unknown";
}
}