using System using DataAccessLayer using System Collections Generic us

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using DataAccessLayer;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
using (UnitOfWork unitOfWork = new UnitOfWork())
{
var users = unitOfWork.Users.GetAll();
var products = unitOfWork.Products.GetAll();
foreach (var user in users)
Console.WriteLine($"{user.Id} {user.Name} {user.AccessLevel}");
foreach (var product in products)
Console.WriteLine($"{product.Id} {product.Title}");
}
Console.WriteLine("OK");
Console.ReadKey();
}
}
}