-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
31 lines (27 loc) · 918 Bytes
/
Program.cs
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
31
using System.Configuration;
using System.Data.Common;
using System.Data.SQLite;
using System.Linq;
using Console.EntityConfiguration;
namespace Console
{
internal class Program
{
private static void Main(string[] args)
{
const string connectionString = @"Provider=System.Data.SQLite;data source=db\database.sqlite";
using (var conn = new SQLiteConnection(connectionString))
{
// conn.Open();
using (var context = new EntityContext(connectionString))
{
var customers = context.Customers.ToList();
foreach (var customer in customers)
{
System.Console.WriteLine("Customer (Id: {0}, Name:{1}", customer.Id, customer.Name);
}
}
}
}
}
}