34 lines
865 B
C#
34 lines
865 B
C#
// See https://aka.ms/new-console-template for more information
|
|
using EgwCoreLib.Lux.Data.Controllers;
|
|
|
|
Console.WriteLine("--------------");
|
|
Console.WriteLine("Lux DB test");
|
|
Console.WriteLine("--------------");
|
|
|
|
LuxController lControl = new LuxController();
|
|
|
|
var listRec = lControl.ItemGetAll();
|
|
foreach (var item in listRec)
|
|
{
|
|
Console.WriteLine($"{item.ItemID} | {item.Description} | {item.Cost}");
|
|
}
|
|
|
|
Console.WriteLine("--------------");
|
|
string? search = "-";
|
|
while (!string.IsNullOrEmpty(search))
|
|
{
|
|
Console.WriteLine("inserire una ricerca, enter per chiudere");
|
|
search = Console.ReadLine();
|
|
listRec = lControl.ItemGetSearch($"{search}");
|
|
foreach (var item in listRec)
|
|
{
|
|
Console.WriteLine($"{item.ItemID} | {item.Description} | {item.Cost}");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
Console.WriteLine("Premere un tasto per chiudere");
|
|
Console.ReadLine();
|