Sort processors by company then by name. Fixes #4

This commit is contained in:
2020-06-09 02:35:48 +01:00
parent 9949210803
commit ad95759ed0
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Version>4.0.0.1573</Version>
<Version>4.0.0.1574</Version>
<Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2020 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product>

View File

@@ -49,7 +49,7 @@ namespace Marechai.Services
SimdSize = p.SimdSize, L1Instruction = p.L1Instruction, L1Data = p.L1Data, L2 = p.L2,
L3 = p.L3, InstructionSet = p.InstructionSet.Name, Id = p.Id,
InstructionSetExtensions = p.InstructionSetExtensions.Select(e => e.Extension.Extension).ToList()
}).ToListAsync();
}).OrderBy(p => p.CompanyName).ThenBy(p => p.Name).ToListAsync();
public async Task<List<ProcessorViewModel>> GetByMachineAsync(int machineId) =>
await _context.ProcessorsByMachine.Where(p => p.MachineId == machineId).Select(p => new ProcessorViewModel
@@ -66,7 +66,7 @@ namespace Marechai.Services
Id = p.Processor.Id,
InstructionSetExtensions =
p.Processor.InstructionSetExtensions.Select(e => e.Extension.Extension).ToList()
}).ToListAsync();
}).OrderBy(p => p.CompanyName).ThenBy(p => p.Name).ToListAsync();
public async Task<ProcessorViewModel> GetAsync(int id) =>
await _context.Processors.Where(p => p.Id == id).Select(p => new ProcessorViewModel