Files
Prog4_Beadando/WD7UVN_HFT_2023241.Client/Program.cs

59 lines
1.1 KiB
C#
Raw Normal View History

2023-12-07 21:01:32 +01:00
using System;
using WD7UVN_HFT_2023241.Models;
using System.Collections.Generic;
2023-10-03 10:36:32 +02:00
2023-10-03 11:00:40 +02:00
namespace WD7UVN_HFT_2023241.Client
2023-10-03 10:36:32 +02:00
{
class Program
{
static void Main(string[] args)
{
2023-12-06 15:15:58 +01:00
RestService rest = new RestService();
2023-12-06 15:56:53 +01:00
2023-12-07 21:01:32 +01:00
List<Employee> employeeList = rest.Get<Employee>("/api/Employee/");
foreach (Employee e in employeeList)
{
Console.WriteLine(
e.NAME +
": " +
e.ID
);
}
List<Customer> customerList = rest.Get<Customer>("/api/Customer/");
foreach (Customer c in customerList)
{
Console.WriteLine(
c.NAME +
": " +
c.ID
);
}
2023-12-06 15:56:53 +01:00
2023-12-07 21:01:32 +01:00
List<MaintainerTeam> maintainerTeamList = rest.Get<MaintainerTeam>("/api/MaintainerTeam/");
foreach (MaintainerTeam m in maintainerTeamList)
{
Console.WriteLine(
m.NAME +
": " +
m.ID
);
}
List<Service> serviceList = rest.Get<Service>("/api/Service/");
foreach (Service s in serviceList)
{
Console.WriteLine(
s.NAME +
": " +
s.ID +
" -> " +
s.IP
+ ":" +
s.PORT
);
}
}
2023-10-03 10:36:32 +02:00
}
}