mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Sort processors by company then by name. Fixes #4
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user