Сделал раздел с устройствами где есть Datagrid с выводом как местоположений так и устройств в них

This commit is contained in:
Hukuta committed 2026-05-07 19:04:10 +09:00
1 parent 3d52cd5691
commit 17e4794160
25 files changed
+595 -308

No files matched your search

+3 -2
View File
@@ -1,5 +1,6 @@
using CartriX.Api.Interfaces;
using CartriX.Shared.Classes;
using CartriX.Shared.Mappers;
using CartriX.Shared.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Migrations.Operations;
@@ -15,8 +16,8 @@ namespace CartriX.Api.Services
}
public async Task<List<Location>> GetAll()
{
var query = await _context.Locations.Include(l => l.printers).ToListAsync();
return query;
var result = await _context.Locations.Include(l => l.printers).ThenInclude(p => p.model).ToListAsync();
return result;
}
}
}