FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Queryology/src/Queryology.Example/Program.cs at master · ByteDecoder/Queryology · GitHub
ByteDecoder
Queryology
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Queryology
/
src
/
Queryology.Example
/
Program.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
35 lines (29 loc) · 1.33 KB
Breadcrumbs
Queryology
/
src
/
Queryology.Example
/
Program.cs
Copy path
File metadata and controls
35 lines (29 loc) · 1.33 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
32
33
34
35
using
ByteDecoder
.
Queryology
.
Example
.
Models
;
using
ByteDecoder
.
Queryology
.
Providers
.
ObjectDumper
;
namespace
ByteDecoder
.
Queryology
.
Example
;
internal
static
class
Program
{
internal
static
void
Main
(
)
{
// Using an EF Core provider
using
var
dbContext
=
new
EfCoreContext
(
)
;
var
totalQueries
=
new
QueryologyEngineBuilder
<
EfCoreContext
>
(
)
.
Configure
(
options
=>
options
.
DataContextProvider
=
dbContext
)
.
AddObjectDumper
(
)
.
Build
(
)
.
Execute
(
)
;
Console
.
WriteLine
(
$
"
\n
🦄🦄 Total Queries allowed to be executed by QueryologyEngine<EfCoreContext>:
{
totalQueries
}
"
)
;
Console
.
WriteLine
(
"🐵🐵 Press Enter to continue... 🐵🐵"
)
;
Console
.
ReadLine
(
)
;
// Only to work with LINQ to Objects
using
var
nullDbContext
=
new
NullDbContext
(
)
;
totalQueries
=
new
QueryologyEngineBuilder
<
NullDbContext
>
(
)
.
Configure
(
options
=>
options
.
DataContextProvider
=
nullDbContext
)
.
AddObjectDumper
(
)
.
Build
(
)
.
Execute
(
)
;
Console
.
WriteLine
(
$
"
\n
🦄🦄 Total Queries allowed to be executed by QueryologyEngine<NullDbContext>:
{
totalQueries
}
"
)
;
Console
.
WriteLine
(
"🐵🐵 Press Enter to continue... 🐵🐵"
)
;
Console
.
ReadLine
(
)
;
}
}
Back
|
FazBrowse Home
|
New Git URL