►
From YouTube: ASP.NET Community Standup - April 28th 2020 - What's New In EF Core with Jeremy Likness
Description
Join members from the ASP.NET teams for our community standup covering great community contributions for ASP.NET, ASP.NET Core, and more.
Community links for this week: https://www.theurlist.com/aspnet-standup-2020-04-28
B
A
C
A
A
Time,
Wow,
okay,
so
we
span
the
range
here:
awesome:
okay,
well,
I'm
gonna
jump
right
into
the
community
links,
so
we
can
give
you
time
to
get
going
on
your
stuff.
So
the
other
button
things
happen.
Okay,
awesome!
Well,
we
start
off
with
just
coincidentally
a
nice.
Any
framework
post
by
Shahid
he's
doing
is
a
through
Z
series
and
this
one
is
on
query
tags.
A
So
this
is
a
nice
feature
which
I
believe
he
points
out
has
been
around
for
a
bit
since
F,
cor
2:2,
but
I
don't
see
widely
used
or
as
widely
as
maybe
as
it
should
be.
So
the
idea
here
is
that
you
can
associate
query
tags
with
a
query,
so
you
can
say
tag
with
and
when
you
do
that,
then
you
see
in
your
sequel
logs.
You
can
see.
You
know
what
you
just
logged
out.
A
B
One
of
the
things
that
we've
frequently
heard
in
the
past,
from
especially
from
people
like
you
know,
support
personnel
who
are
trying
to
route
issues
is
that
they
can't
trace
back
the
issue
that
they
find
in
the
server
to
the
list.
Specific
link,
query
that
created
it,
and
so
the
main
reason
for
the
tagging.
Your
queries
is
so
that
when
you
get
some
issue
that
your
DBA
or
somebody
else
is
saying,
hey
this,
you
know
something's
wrong
here.
You
can
then
quickly
go
back
and
find
that
link
query
that
generated
it.
Yep.
A
Well
and
then
so
she
had
also
points
out
some
just
kind
of
little.
You
know
tips,
you
really
are
just
writing
out
a
string,
but
some
nice
things
to
remind
you
that
you
can
use
string
interpolation,
so
that's
handy
and
then
he
also
shows
off.
You
know
using
the
newline
character
right,
so
you
can.
You
can
use
the
at
to
escape
at
the
beginning,
and
then
you
can
write
out
more
complex
things
and
then
he
links
over
to
the
docs
for
additional
information.
A
Alright,
few
blog
posts
just
updates
from
the
team
dotnet
ASP
neck
core
updates
for
dotnet
5
preview,
3,
not
a
huge
amount
in
here
as
you'd
expect
as
we
get
you
know
towards
preview
3.
But
here
we
have
updating
existing
project
and
then
the
main
thing
here
pointing
out
performance
improvements
for
HTTP
to
well
and
HTTP
to
important
for
things
like
you
know:
G
RPC
performance
as
well,
and
then
Dan
writing
about
blazer
web
assembly
free
to
o
preview
5
coming
out
soon
soon
soon.
A
So
this
some
some
cool
things
here,
some
kind
of
better
integration.
Things
like
reading
configuration
during
startup
honoring
web
config
when
publishing
things
like
that
and
support
for
time
zones
as
well.
So
you
know
nice,
nice,
good,
stuff,
mm-hmm
this.
This
was
neat.
I
just
saw
this.
This
tweet
come
by
so
so
from
Vaako.
He's
writing
about
this
is
higher
performance
reading
input
file
reading
in
Blazers.
So
the
idea
here
is
he's.
Actually
you
know
you,
you
can
load
up
a
file
and
his
example.
He
loads
up
two
gigabytes
in
and
the
actual
parsing
part.
A
This
is
actually
kind
of
interesting
is
he's
going
down
into
and
calling
directly
into
some
of
the
mono
runtime
under
under
the
hood.
So
it's
directly
calling
into
things-
and
you
know
to
be
aware
of
some
of
this-
is
you
know
like
that?
You're
calling
directly
like
into
binary,
reads
and
writes
and
stuff.
So
you
know
you'd
want
to
understand
that
as
well,
but
blazing
fast,
so
we
didn't
eat
and
relock
writing
about
preventing
mass
assignment
or
over
posting
with
razor
pages.
A
So
the
idea
here
is,
if
you
naively,
bind
to
things
you
can
like
say,
for
instance,
here
I
have
a
name
and
in
his
admin
and
if
I
allowed
somebody
to
if
I
just
directly
bound
to
is
admin,
then
somebody
could
also
post
and
pass
that
in
a
query,
string
or
post.
So
this
has
already
gotten
I
think
a
lot
better
than
it
was
with
MVC.
You
know
we
try
and
kind
of
protect
you
as
much
as
possible
with
NBC,
but
it's
common.
You
know
a
lot
of
time.
A
People
will
bind
directly
to
the
model
in
a
controller
and
you
can
you
can
get
to
problems
and
so
part
of
what
the
page
model
gives.
You
is
it's
kind
of
a
better
path
for
that.
But
Andrew
still
does
point
out
that
you
can.
If
you,
if
you
naively
are
you
know,
are
binding,
then
you
can
run
into
problems.
A
So
he
shows
a
case
where
you
could
go
through
and
set
somebody
to
an
admin
bio
if
you
knew
what
what
was
in
there
or
if
you
just
kind
of
guessed,
so
he
talks
about
some
different
approaches.
One
is
a
dedicated
input
model,
so
just
because
you
have
a
page
model
doesn't
mean
you
have
to
find
directly
from
there.
A
He
also
does
point
out
some
other
things
like,
for
instance,
you
can
directly
set
things
in
your
like
you're
buying
properties
and
that's
often
I
think
you
know
a
kind
of
a
simpler
case.
So
he
also
points
out
VC
know
that
the
options
you
have
there.
It
really
has
gotten
better
over
time
that
we
have
all
these
attributes
that
you
can
put
on
properties
and-
and
you
know
with
scaffolding,
we
try
and
keep
you
as
safe
as
possible
by
default.
So
then,
you
know
just
kind
of
wrap
up
and
there's
a
neat
thing.
A
I
just
saw
the
asp
net
team
bleeding
about
recently
the
beginning
of
work
on
a
reverse
proxy.
So
this
is
a
high-performance
Roxy,
I,
honestly
I,
don't
know
you
know
too
much
more
about
it
other
than
it's
neat
and
I'm
keeping
an
eye
on
it.
It
looks
like
fun
and
then
one
more
from
Christos
and
Christos
is,
has
just
moved
to
the
Microsoft
identity
team,
as
a
p.m.
and
so
here
he's
walking
through
using
the
Microsoft
graft,
api's
and
hooking
that
into
an
existing
asp
net,
core
3-1
application.
A
A
So
you
know
definitely
interesting-
and
this
has
I've
worked
with
this
over
time
and
and
it's
nice
to
see
these
libraries
maturing
and-
and
this
is
simplified
from
when
I
had
worked
on
before
and
as
always,
we
share
the
links
out
of
and
I'll
pass
these
in
the
chat
and
put
these
in
there
in
the
show
notes
at
the
end
and
I'm
ready
to
go
back
to.
Let
me
see
switching
over
this
should
show
all
of
us
hooray
we're
back
awesome,
so
I
think
Jeremy.
You
were
gonna
start
first
I'm.
C
Gonna
start
first
I
actually
have
a
few
things
to
show.
So
let
me
share
my
screen,
make
sure
that's
up
and
running
here
and
thanks
for
having
us
on
we're,
actually
super
excited
about
starting
our
own
stand
up.
That's
going
to
be
the
first
Wednesday
of
every
month
at
the
same
time,
but
on
Wednesdays
instead
of
Tuesdays,
so
our
first
one
is
actually
coming
up
on
next
week,
Wednesday
May
6th
so
check
that
out
we'll
be
on
this
same
Channel
live
streaming.
I
wanted
to
do
just
a
quick
introduction.
C
I'm
assuming
most
people
are
familiar
with
an
indie
framework
for
those
who
aren't
it's
really
easy
to
get
to
the
docks
I'm
going
to
zoom
in
here.
It's
there's
a
short
link,
acha
Ms,
/ef,
docks
and
that'll.
Take
you
to
the
equally
easy-to-remember
docks
that
microsoft.com
/ef,
but
what
I
want
to
show
is
just
this
is
the
entryway
to
our
documentation.
We
just
revamped
this
so
if
you've
been
to
the
entity
framework
or
docks
in
the
past.
Hopefully
this
gets
you
to
where
you
want
to
go
a
lot
faster.
C
We've
got
a
few
quick
jumps
here,
I'm
going
to
show
you
something
in
a
second
specific
to
that
we
are
a
object,
database
mapper
and
so
it's
similar
to
an
object,
relational
mapper,
but
we
do
have
support
for
non-relational
databases,
cosmos,
DB,
it's
something
I'll
be
showing.
Today
we
work
with
flavors
of
sequel,
Postgres,
my
sequel,
Azure,
cosmos,
DB.
We
have
Oracle
provider.
So
there's
a
lot
of
depth
of
support
that
we
have
in
this
tool
and
we
also
work
on
several
platforms
because
we're
true
Donette
core.
We
can
run
on
asp
net
core.
C
We
can
run
on
blazer
server.
I'm
gonna
show
you
that
WPF
WinForms
and
xamarin.
So
a
lot
of
depth
there.
The
easiest
way
to
stay
in
touch
with
what
we're
doing
to
keep
up
with
the
team
is
to
come
to
this
there's
a
short
link
for
this.
That's
just
EF
core
feedback.
But
if
you
come
to
this
page,
the
issues
page
on
the
repo,
we
have
a
weekly
status
and
you
can
drill
down
into
that
weekly
status
and
it's
added
to
every
week.
C
If
we
jump
down
to
the
end,
we
can
see
the
most
recent
update
and
it
includes
the
burn
down.
So
what
I
love
about
this
team?
Is
they
do
everything
out
completely
in
the
open?
We
have
design
discussions
on
github,
etc,
and
we
get
a
lot
of
community
contributions.
This
section
right
here
is
just
in
the
last
preview,
some
community
contributions
that
made
it
into
that
preview.
So
we
thank
the
community
for
that.
Actually,.
B
C
Cool,
so
let's
jump
here,
I
want
to
show
a
couple
things
I
want
to
show
for
those
not
familiar
with
initi
framework
a
little
bit
on
getting
started
for
those
who
are
familiar
show
some
new
features.
First
thing
I'm
showing
you
is:
this
is
sequel:
server
management,
studio,
I'm,
gonna
start
with
a
sequel,
server
example.
You
can
see.
C
I
have
a
few
random
databases
here,
but
what
I
want
to
do
is
work
on
a
blogs
database
and
that
blogs
database
isn't
here
so
I'm
going
to
get
started
with
the
project
and,
while
I'm
spinning
up
this
project,
we're
gonna
do
new
project,
don't
the
done
and
we're
going
to
do
a
blazer
server
project
and
while
that's
spinning
up,
there's
really
three
ways
that
you
can
manage
the
way
entity
framework
works
with
your
database.
Let
me
pick
this
blazer
app
see
how
much
I
can
talk
and
navigate
at
the
same
time.
We'll
do.
C
C
C
We
can
create
it.
So
while
that's
spinning
up
there's
really
three
approaches
you
can
take,
you
can
use
a
database
and
we
have
a
scaffolding
tool
that
you
point
at
the
database
and
it'll
spin
up
c-sharp
classes
that
model
the
database
for
you.
That's
sort
of
a
database
first
approach,
there's
a
code
first
approach
which
I'm
going
to
show
now,
where
I
define
my
c-sharp
classes
and
create
a
database
based
on
those
classes
and
then
there's
kind
of
what
a
meet
in
the
middle
approach
that
a
lot
of
people
follow
where
the
database
is
designed.
C
One
side
c-sharp
classes
are
designed
on
the
other
side.
Entity
framework
is
configured
to
map
between
the
two
of
these.
So
I've
got
my
Blaser
server
project.
I'm,
just
gonna
go
ahead
and
run
it.
Let's
get
past
the
first
hurdle
to
make
sure
it
compiles
and
runs
without
me,
making
any
crazy
changes
to
that
and
we're
gonna
run
into
I.
Think
some
of
the
team's
delay
that
happens
here
with
screen
sharing
at
the
same
time,
but
I
do
have
a
method
for
that.
That's
cycling,
the
mouse
clockwise,
oh
wow,.
A
C
C
So,
while
I
talk
about
this,
what
I'm
gonna
do
is
I'm
gonna
create
some
c-sharp
classes,
and
these
classes
will
have
nothing
to
do
with
database
whatsoever.
They're
just
gonna
be
pure,
we'll
call
them
domain
classes
that
I
want
to
get
into
nuance,
philosophies
the
domain,
driven
design
etc,
but
I'll
have
a
few
classes
and
then
we're
gonna
see
how
to
wire
up
a
database.
So
this
is
my
Blaser
server
app
if
I
click
the
counter
it
works.
If
I
fetch
data,
we
fetch
data.
So
that's
good
I
just
wanted
to
do
that.
C
Reality
check
so
now,
I'm
gonna,
add
a
file
and
I'm
gonna
follow
not
the
best
practice
in
the
world,
because
I'm
gonna
dump
a
bunch
of
stuff
in
a
single
file
turns
out
that
will
actually
work.
The
application
will
run,
might
not
be
the
most
beautiful
organization
of
code,
but
that's
okay,
I'm
gonna,
give
it
the
scientific
name
state
us
the
like.
C
Right
right
out
of
that
book,
so
the
first
thing
we're
gonna
do
inside
a
data
stuff
is
we're.
Gonna
create
a
class
for
a
blog.
Has
an
ID
and
name
a
URL
in
a
post
has
an
ID
a
title:
is
it
active?
We
have
this
reference
to
the
blog
ID
it
belongs
to
plus
we
want
to
be
able
to
navigate
directly
to
the
blog.
So
if
I
get
to
a
post,
I
want
to
be
able
to
get
to
a
blog.
C
So
now
that
I've
got
post
defined,
I
can
kind
of
do
the
circular
reasoning
thing
here
and,
let's
add
a
another
property
to
blog,
because
a
blog
actually
has
a
collection
of
posts,
so
we're
just
going
to
set
up
that
collection.
So
those
are
my
C
sharp
classes.
Imagine
they're
in
a
nice
separate
Donette
standard
class
library
that
I
can
share,
etc.
So
now
I
want
to
bring
in
entity
framework.
C
So
what
I'm
going
to
do
is
go
into
my
tools
and
manage
my
new
get
packages
for
the
solution
and
the
way
in
a
different
work.
Core
works.
Is
we
have
providers
that
work
for
different
databases?
So
there's
a
Cosmos
provider
there's
a
sequel
provider.
If
we
do
entity
framework
core
and
start
with
sequel,
you
can
see
I've
got
the
sequel
server,
so
I
can
pick
that
choose
my
project
and
install
it.
The
other
thing
I
want
to
do
is
bring
in
a
set
of
tools.
C
So
there's
some
tooling
extensions
that
we'll
look
at
in
a
minute
and
the
way
that
I
bring
those
into
the
project
is
once
this
installs
bleeding-edge,
okay,
perfect,
as
we
go
to
dot
tools,
and
we
take
that
and
we
install
those
tools
and
I'll
talk
more
about
what
those
tools
are
in
a
minute.
So
now
I've
got
into
the
framework
core
added
to
my
application.
It's
ready
to
talk
to
a
sequel
server,
so
my
data
stuff
I,
want
to
create,
what's
called
a
DB
context.
C
Think
of
this
as
a
scope
or
a
context
for
doing
work
with
the
database.
This
is
sort
of
your
interface
to
the
database.
So
what
this
looks
like
is
we
inherit
from
DB
context,
which
is
provided
as
part
of
in
any
firm
or
core,
and
then
we
expose
these
DB
sets
a
DB
set.
You
think
of
that
as
mapping
to
something
like
a
table,
it's
something
that
you
can
reference
on
its
own,
so
I
can
get
the
blog's
directly
or
I
can
get
the
posts
directly
in
this
DB
set
now.
C
The
next
thing
I
want
to
do
is
I
want
to
seed
my
blog,
so
it
is
possible
through
code
to
define
what
the
initial
state
of
your
database
looks
like.
An
indie
framework
is
smart
enough
to
look
at
what
your
current
schema
is.
What
your
current
data
looks
like
and
generate
the
right
scripts
to
make
up
the
difference
between
that,
so
we're
just
going
to
seed
some
initial
data.
Let
me
bring
that
over.
C
For
you
right
here,
and
so
the
way
this
is
working
is
I'm
telling
it
okay,
so
for
this
blog
entity,
this
has
data,
passing
it
a
couple
of
blogs
for
this
post.
This
has
data,
passing
it
a
couple
posts.
So
that's
just
C
data.
That
says
first
time
you
create
this
database.
Let's
make
sure
that
this
data
exists
in
the
database
and.
A
That
that
seed
data
that's
been
out
for
a
little
bit,
but
for
people
that
that
III
don't
know
this.
This
was
a
nice
thing
when
it
first
came
out
that
C
data,
because
this
is
migration
aware
and
it's
kind
of
more
it's
better
integrated
than
kind
of
the
hacks
we'd
do
with
like
trying
to
hook
in
at
projects
start
right
and.
C
B
B
However,
it
usually
when
writing
tests,
I
would
still
use
a
method
to
seed
my
database
rather
than
using
seed
data,
and
that's
primarily
because
right
now
you
have
to
modify
your
model
to
put
your
seed
data
into
it
and
there
isn't
really
a
great
way
of
building
your
model
for
your
tests
that
include
the
seed
data
without
kind
of
impacting
your
application
when
you're
building
the
model
for
your
application.
So
I
think
that's
something
that
we
should
look
into
and
I
have
some
ideas
about
additional
hooks
that
could
make
the
seed
data
more
useful.
B
C
Cool,
so
it
demos
well
the
seed
data
by
the
way
so
I'm
going
to
call
that
out.
So
this
is
the
extension
method
that
comes
within
the
D
framework
or
that
wires
up
the
blog
context.
There
are
different
options
that
you
can
pass
to
a
context,
so
there's
some
more
going
on
behind
the
scenes,
but
this
makes
it
pretty
easy
for
me
and
now
before
we
can
actually
show
something
I'm
coming
over
to
shared
and
adding
a
new
razor
component.
C
So
let
me
do
that
because
I
want
to
be
able
to
show
an
individual
blog
post,
so
I'm
gonna
call
this
blog
item
dot
razor,
and
this
is
just
a
razor
component.
Let's
let
that
spin
up
and
then
I'm
going
to
type
as
fast
as
I
can,
and
basically
this
has
a
parameter.
So
we're
gonna
pass
a
blog
object
into
this.
C
Alright,
let's
put
things
in
the
right
place
all
right,
so
what
we're
doing
is
if
we
have
a
list
of
blogs
for
each
blog,
we're
using
our
blog
item
component
and
passing
the
blog
into
it.
This
is
our
list
of
blogs
and
when
we
initialize
the
component,
we're
calling
this
is
my
dbcontext
that
I
created
I'm
going
to
the
blogs
I'm
telling
it
to
order
by
name.
So
that's
one
of
the
nice
things
about
entity
framework
is
you
can
use
link?
C
You
can
actually
use
some
very,
very
complex,
specific
intricate
link
to
define
what
you're
doing
and
then
I'm
just
taking
this
to
a
list
and
that's
it
so,
the
initial
time
this
component
comes
in,
it's
gonna,
go
out,
fetch
the
items
from
the
database
and
we're
done
so.
Let
me
go
ahead
and
run
this
I'm
not
expecting
this
to
work
well,
but
I
want
to
show
you
as
a
new
developer.
Let's
say
you
were
going
through
these
steps
and
you
did
the
same
thing.
I
did
and
thought
hey
I've
got
everything
in
place.
C
C
Next
time
come
on,
come
on,
you
can
do
it
all
right,
so
we
got
our
exception.
So
relational
store
is
being
configured,
that's
sequel
without
specifying
either
the
connection
or
connection
string.
So
silly
me,
we
need
a
connection
string
for
this
to
actually
work.
So
what
I'm
going
to
do
is
go
back
into
data
stuff
and
where
I
tell
it
to
use
sequel
server,
I'm
going
to
give
it
a
nice
connection.
C
C
Right
like
that,
could
come
from
your
app
set.
Absolutely
it
should
come
from
configuration
right.
We
should
have
never
stored
in
encode.
This
is
a
demo
friendly,
behavior,
that's
okay,
to
get
through
it
a
little
more
quickly
but
you're,
absolutely
right.
It
should
come
from
a
configuration
or
something
like
key
vault.
So
we
can
hide
our
secrets
now
it
popped
open
in
another
window.
For
me,
let
me
drag
this
over,
so
you
can
see
it
if
I
can
actually
hold
on
to
it.
Come
on.
You
can
do
it
all
right.
C
So
what
we
got
is
cannot
open
database.
My
blogs,
the
login
failed
because
that
database
doesn't
exist.
I
showed
you
that
it's
not
going
to
do
anything
out
of
magic
for
us.
This
is
why
I
installed
the
tools
that
come
with
it,
because
the
way
into
the
framework
works
is,
let's
see
new
gate.
Let's
go
to
package
manager
console
is
you
can
opt
in
to
create
something
called
migration,
so
what
migrations
do
is
they
create?
Keep
track
of
different
steps
or
iterations
of
your
database?
C
So
right
now
I'm
at
my
first
step
so
in
the
package
manager
console
down
here
the
bottom
I'm
going
to
add
a
migration
called
initial.
Now
what
this
will
do
is
it
will
look
at
my
DB
context
and
it'll
figure
out
everything
needed
to
create
that
initial
state
of
DB
context,
and
you
can
see
it's
created
a
file.
If
I
zoom
in
over
here,
you
can
see
I've
got
migrations
here
in
the
code
now
I'm
gonna
talk
a
little
bit
about
how
this
works
in
production
in
a
second.
C
But
let's
just
get
this
going
so
now,
I
have
a
migration.
If
I
come
and
look
at
my
database
and
I
refresh
that
will
expand
it.
I'm,
not
gonna
zoom
in
because
it's
well
I'll
go
and
zoom
in
just
so.
You
can
see
so
there's
no
database
there.
Yet
so
what
I
need
to
do
is
say,
update
database.
This
will
look
at
the
migrations
and
apply
what's
needed
to
get
my
database
to
the
right
state.
C
So
no
blow
up,
and
now
we've
got
my
blogs,
so
it's
created
the
database.
If
we
expand
that
you
can
see,
I've
got
two
tables
and
here's
blogs
and
posts
and
an
internal
table
that
that
uses.
So
it's
created
the
columns.
It's
figured
out,
IDs
an
identity
column.
It's
figured
out
posts
is
foreign
key
referencing
back
up
to
blog
ID.
So
it's
done
all
that
for
me
now.
The
first
new
thing
I
want
to
talk
about
is
right.
C
Now
these
migrations
are
embedded
in
the
same
project
and
there
hasn't
been
great
guidance
on
when
to
run
these,
because
sometimes
people
run
it
on
startup,
but
that
can
create
issues.
For
example,
if
you're
in
a
load-balanced
environment,
you
have
multiple
web
server.
Spinning
up
at
once.
The
last
thing
you
want
is
all
three
of
them
trying
to
apply
migrations
at
the
same
time.
So.
B
C
Of
the
things
we're
working
on,
it's
not
released
yet,
but
we're
working
on
a
bundling
option
that
you
basically
look
at
a
set
of
migrations
and
you
get
an
artifact,
that's
an
executable
that
will
just
apply
the
migrations.
So
now,
I
have
an
artifact
that
I
can
plug
into
my
CI
CD
pipeline
and,
as
a
first
step,
I
can
stage
the
database
changes
before
deploying
the
updated
application.
So.
C
A
C
In
a
nutshell,
migrations
look
at
any
changes
in
your
schema
from
the
last
iteration
that
you
ran
a
migration
and
then
it
creates
the
code
necessary
to
generate
the
scripts
to
get
the
database
up-to-date.
So,
let's
say
I
add
a
property.
I
drop
a
column,
let's
say
I,
add
an
entirely
new
entity.
Every
time.
I
do
add
my
Gration.
It's
going
to
look
at
here's
the
current
state
of
how
I've
configured
my
DB
context.
This
is
what
the
previous
state
looked
like.
C
B
Think
if
we
go
back
now
to
what
you
said
at
the
beginning,
it's
be
useful
to
revisit
like
the
different
ways
that
you
can
use
EF.
So,
in
the
case
of
migrations,
what
you're,
basically
doing
is
saying
my
source
code,
my
c-sharp
code,
that's
the
source
of
truth,
also
from
my
database
I'm,
defining
my
database
by
their
mapping
in
there
and
then
I'm
going
to
use
migrations
to
translate
what
I
put
in
my
c-sharp
code
into
something
that
I
can
incremental
e
update.
B
My
database
schema
with
so
that's
kind
of
really
driving
from
the
code
and
using
your
code
as
a
source
of
truth,
and
if
you
compare
that
to
the
other
two
things
that
Jeremy
talks
about
in
any
other
two
ways
of
using
AF,
either
I
have
an
existing
database
and
I
just
use
it
to
generate
the
c-sharp
code.
So
in
that
case
the
database
is
the
source
of
truth
and
I
just
use
it
to
generate
c-sharp
code
for
my
mappings
or
the
kind
of
hybrid
approach,
which
is
the
DBA
or
somebody
else
is
managing
my
database.
B
So
I'm
not
using
migrations
to
do
it,
but
I've
defined
my
mappings
to
that
database
just
in
code,
and
so
so
when
say
the
DBA
or
yourself
or
whoever's.
Managing
the
database
adds
a
new
column.
You
just
go
manually,
say:
okay,
I've,
had
it
in
your
column,
on
my
database,
I'll
put
a
property
our
model.
If
I
need
to
configure
the
column
name
or
anything
I'll,
do
it
I'll,
do
it
right
there
and
you
kind
of
migrate
them
both
at
the
same
time.
B
B
B
So
yeah
we've
wrote,
we
wrote
code
from
a
long
time
ago.
You
know
generate
to
be
able
to
generate
databases
at
runtime,
and
that's
super
useful
for
prototyping
for
testing
and
lots
of
test.
Suites
will
generate
their
databases
from
code
problem.
Is
that
it's
massively
over
used
in
production
apps?
Because
it's
so
easy
to
do
you
just
somehow
stick
them.
B
You
can
then
just
pass
that
over
to
your
DBA
and
run
it
or
you
put
it
in
your
CI
pipeline
and
run
it
and
saying
those
things
it
makes
it
sound
easy,
but
actually
getting
a
script
and
then
figuring
out
what
do
I
actually
have
to
do
with
this
script?
To
really
make
this
work?
How
do
I
actually
integrate
this
with
my
CI
payroll
and
how
do
I,
how
do
I
give
that
to
you?
How
do
I
deploy
it
onto
the
production
database
when
I'm
updating
my
application?
B
B
A
B
B
There
are
ways
there
are
things
you
can
do
to
make
sure
that
the
information
that
AF
is
tracking
in
the
migration
history
table
is
up-to-date
with
what's
really
in
the
database
and
then
once
you
get
to
that
state,
then
you
just
keep
going
like
normal
and
migrations,
but
we
do
want
to
had
some
better
guidance
and
help
around
that
as
well.
All.
C
No
worries
that
was
great
great
discussion,
I,
think,
migrations
and,
and
probably
one
of
the
biggest
challenges
right
with
updating
applications
is
how
do
you
synchronize
the
schema
changes
in
the
database
with
the
code,
so
I'm
glad
people
on?
On
top
of
that?
This
is
the
control
that
I
ran
and
we
can
see
it's
picked
up
my
blogs,
but
if
we
go
back
to
the
component,
I
wanted
it
to
iterate
the
posts
inside
the
blogs,
and
it
hasn't
done
that.
C
C
It's
lots
of
training,
so
I'm
just
breaking
this
out
into
two
steps
here,
basically
setting
up
the
query
and
then
awaiting
it
and
I'm,
just
gonna
put
a
breakpoint
and
let's
do
it
right
after
we
get
the
the
query
and
I'm
going
to
run
in
debug
and
we'll
let
this
spin
up.
So
what
I
want
to
show?
C
You
is
two
features
that
we
added,
because
obviously
one
of
the
main
goals
here
is
to
be
able
to
use
code
to
interact
with
the
database
and
one
of
the
biggest
challenges
people
can
often
run
into
is
when
they're
writing
complex
link
statements
to
translate
into
sequel.
How
does
that
translate?
How
is
he,
if
cauri,
going
to
parse
that
and
turn
that
into
a
sequel
statement,
so
we've
just
landed
on
our
breakpoint?
We've
done
a
couple
things
to
make
life
easier,
I'm
going
to
show
you
one
of
them
right
now.
C
If
I
come
over
query
right
now,
I'm
going
to
go
into
expand
this,
let
me
zoom
in
actually
so
people
can
see
what
I'm
doing
so.
We've
got
this
debug
view
and
the
debug
view
is
interesting
because,
if
I
expand,
this
I
get
an
expression
which
shows
sort
of
the
expression,
syntax,
but
I
also
get
this
query
and
I'm
going
to
open
this
up,
and
what
you
can
see
is
this
is
showing
me
the
actual
query
that
was
generated
from
that
link.
So
I
can
do
that
right
through
debug
there's
another
way
to
do
it.
C
I'll
show
you
in
a
second,
but
you
can
see
it's
grabbing
blogs.
It's
not
doing
anything
with
posts,
that's
because
with
entity
framework
you're
in
total
control,
and
we
don't
want
to
bring
back
the
entire
database
if
you
don't
need
the
entire
database.
So
what
we
can
do
is
I'll.
Let
this
run
through
is
we
can
change
this
here
and
say:
dot
include.
C
Yeah
we're
gonna
have
to
stop
debug
for
this
change,
that's
fine,
I'm,
gonna,
say
dot
include,
and
this
is
my
blog
and
what
I
want
to
include
is
my
posts
not
sure
why
intellisense
is
giving
me
a
hard
time
there,
but
let's
go
ahead
and
rebuild
that.
So
what
I've
done
is
that
I've
explicitly
said
blog
zone
posts,
so
I
want
to
explicitly
opt
in
to
bringing
in
those
posts
for
the
call.
So
let
me
rerun
it
with
that
change.
C
Alright,
so
we
hit
our
break
point.
I'm
gonna,
come
back
to
this
query,
give
it
a
second
to
spin
up
I'm
gonna,
open
the
non
public
member,
there's
queryable
debug
view,
and
this
time
I'm
gonna
grab
this,
and
now
we
can
see
that
it's
actually
doing
a
join
to
pull
the
post
data.
Now
this
query,
by
the
way,
is
a
perfectly
formatted
Corre
I'm,
not
showing
an
example
with
parameters.
Let
me
run
this
and
show
you
what
happens
when
it
gets
the
results
back.
C
C
And
pace,
then,
basically,
what
I
got
from
the
debug
view?
Mm-Hmm
and
I
can
execute
that
and
I'm
going
to
get
basically
the
same
result
that
it
had
and
that'll
work
with
parameters
and
some
other
things.
So
that's
useful
one
of
the
things,
though
you'll
notice
is
actually
I,
don't
want
to
exit
out
of
here.
One
of
the
things
you'll
notice
is
that
the
inactive
post
here
is
showing.
So
this
is
another
feature
that
we
just
added
is
what
we
call
filtered
includes
so
in
this
include
where
I
include
be
posts.
A
C
More
parenthesis,
oh
thank
you-
is
live
all
right,
so
spin
this
up
and
show
the
other
thing
and
I'm
gonna
I
was
gonna,
show
with
tagging,
but
you
already
had
the
blog
post
for
that.
So
I
think
I'm
gonna
jump
because
I
want
to
show
the
cosmos
T,
be
an
example
as
well,
but
let's
let
this
spin
up
and
we've
got
our
page
done
done
the
moment
of
truth,
all
from
scratch.
C
C
Right
there
we
go
inactive.
So
that's
that.
Let
me
stop
this
and
close
this
out.
So
the
nice
thing
about
any
framework
and
a
reason
why
I
think
a
lot
of
people
who
are
using
it
like
to
use
is
it
gives
a
consistent
interface
for
how
you
deal
with
data
on
the
back
end.
So
in
that
vein,
I've
got
another
project
here
now.
This
is
a
WPF
on
dotnet
core
project,
just
because
it's
easier
for
me
to
show
what
I
want
to
show
I've
got
the
appropriately
named
data
stuff
file
in
here.
C
So
I'm
noting,
if
I'm
not
consistent
and
within
that
I've
got
a
blog
now,
I've
done
the
blog
a
little
differently.
Cosmos
DB
doesn't
have
an
ID
generator,
so
you
need
to
create
your
own,
unique
IDs.
So
I'm
just
doing
this
as
a
gooood
right
here
and
initializing,
it
I
have
name
URL
list
of
posts
and
then
notice,
I'm
saying
owned
posts.
So
this
is
the
thing
we're
going
to
a
know,
sequel
database,
so
things
work
differently.
C
In
document
databases,
I
don't
need
to
have
a
separate
table
to
hold
posts
if
they
always
belong
to
a
blog.
There
are
some
reasons
you
might
want
to
split
them
out,
but
for
the
most
part,
I'm
fine,
with
posts
just
being
owned
by
the
blog,
so
I
just
give
it
a
title,
and
it
is
active.
The
dbcontext
looks
the
same
except
I'm
just
exposing
blogs.
I,
don't
have
a
separate
construct
for
posts,
they're
gonna
be
embedded
in
the
blogs
and
then,
instead
of
using
sequel,
I've
included
it
cosmos
and
I've
got
my
cosmos
endpoint.
C
My
top
secret
key
and
my
database
name
looks,
should
look
very
familiar
to
what
the
other
piece
looked
like
now
in
my
main
window,
I'm
not
going
to
get
into
too
much
of
the
nuances
as
a
mammal
but
I'm
creating
a
context
here
and
then
what
I'm
doing
is
basically
where's,
my
refresh
so
I'm
getting
a
collection
view
source
so
that
binds
to
a
list
and
I'm
telling
it
to
load
the
blogs
and
setting
the
blogs
to
that
source.
So
pretty
straightforward
piece
of
code
here
when
I
click
Save
button,
guess
what
I'm
saving
changes.
C
This
WPF
app
so
I've
got
my
two
blogs:
I've
got
first
post.
Second,
post
I've
got
some
other
blog,
so
let
me
just
go
ahead
and
do
a
third
post
here
and
I'll
leave
it
inactive,
so
I'm,
typing
third
post
I'm,
leaving
that
blank
I'm,
gonna
click,
Save
I've
got
my
awesome
modal
dialog.
So
it's
round-trip.
Let's
take
a
look
at
cosmos,
DB
itself,
so
here
I've
got
cosmos,
DB
open
in
the
portal.
We've
got
my
blogs,
so
it's
created
a
container
with
the
name
of
the
context
and
inside
of
the
container.
C
We
have
two
items,
one
for
each
blog.
If
I
grab
this
now.
This
is
interesting
because
I
want
to
talk
a
little
bit
about
how
this
works
document.
Databases
don't
have
locked-in
schemas,
so
we
can
have
different
schemas
in
the
same
database.
So
if
I
decided
to
put
posts
as
individual
entities
they
can
live
in
the
same
document
container,
they
would
just
have
a
different
discriminators.
This
is
what
tells
it
the
type.
So
we've
got
the
ID
notice.
C
C
Okay,
we
found
that
one,
so
we've
got
two
windows
side
by
side,
so
the
classic
issue
that
we
have
is
I
could
come
here
and
do
fourth
post
I'm
going
to
do
save
and
it
did
that
fine
and
then
I
can
come
over
here
and
do
fourth
post
y'all
and
do
save
and
that'll
actually
work.
Fine,
because
there's
no
concurrency
checks.
So
now,
if
I
close
this
and
reopen
it.
C
So
see,
basically
it
just
over
wrote
without
so
we
can
fix
that.
What's
interesting
is
cosmos.
Db
has
that
concurrency
token?
So
that's
a
tag.
That's
inside
of
cosmos,
DB
that
checks
for
updates
I,
don't
want
to
mutate
my
model
and
put
a
concurrency
property
on
it
just
to
satisfy
the
database,
and
so
fortunately,
entity
framework
for
me
allows
me
to
do
something
like
this
and
I'm.
Just
gonna
paste
it
in
here
and
then
I'll
explain
what's
happening
so
I
can
create
something
called
a
shadow
property.
C
So
this
is
a
property
that
entity
framework
will
track,
even
though
it's
not
explicitly
on
the
model,
and
there
are
api's
that
allow
me
to
get
to
this
value,
even
though
it's
not
referenceable
directly
on
the
class.
If
I
want
to
reference
it
I
can.
But
here
I'm
just
saying
it's
a
eat
egg.
Now
we've
had
this
functionality
for
a
while,
which
is
creating
shadow
properties.
What's
new
and
what's
really
nice
about
this,
this
is
a
community
contribution.
C
So
we
had
someone
in
the
community
write
this
code
that
we
merge
into
the
code
base,
but
it
basically
tells
it
that
that
tag
is
the
concurrency
tag.
So
now
entity
framework
knows
about
that
tag.
So
let's
go
ahead
and
start
actually.
I
didn't
want
to
do
that.
I
want
to
start
one
in
debug
and
one
not
in
debug.
Let's.
A
C
B
C
C
C
C
We
got
a
response
at
a
sub
status
and
it's
gonna
say
precondition,
not
meant,
but
basically
it
is
understanding
that
a
concurrency
violation
has
occurred.
Now,
as
a
user
in
my
code,
I
can
trap
that
specific
exception
and
I
can
decide
what
I
want
to
do
with
it.
I
can
show
a
nice
message
that
says
it
has
changed.
B
C
And
let
me
just
add
this
though
aka
DMS
AF
core
5,
so
that's
a
short
link:
ok,
MSE
of
core
5!
That's
going
to
take
you
to
the
running
list
of
what
we've
actually
released
so
there's
a
high-level
plan
of
what
we
want
to
eventually
end
up
in
the
product.
These
are
by
preview.
What
actually
is
currently
in
the
preview
of
the
product
that
you
can
use
today
and
you
can
see,
there's
a
substantial
amount
of
functionality,
yeah.
B
So
we
really
want
people
to
use
the
previews.
You
don't
need
to
have
done
at
5
to
use
the
previews
they
the
core
5
targets,
dotnet
standard
to
one
still,
so
you
can
use
it
with
your
three
one,
apps
and
we'd
love
to
get
your
feedback.
We
love
to
find
the
issues
before
we
go
live.
We
try
very
hard
to
keep
the
previews
and
the
daily
bills
that
we
also
have
good
quality.
B
A
B
A
B
B
Issue
that
we
refer
to
as
update
model
from
database
that
it's
a
big
feature,
it's
a
lot
of
work
to
do
that
in
a
reliable
and
and
useful
way,
people
often
say
that
it
existed
in
EF
6,
which
is
true.
If
you
were
using
the
designer
to
some
degree.
However,
I
think
people
or
maybe
forgetting
how
bad
it
was
at.
You
have
6.
A
B
It's
very
difficult,
so
you
know
it
breaks
on
our
team
is
very
interested
in
these
kinds
of
things
and
I
suspect
we
will
get
to
it.
I'm,
not
sure
when
it's
definitely
not
5
and
it
probably
won't
be
6.
That's
just
the
reality
of
the
complexity
of
their
feature
versus
the
value,
and
you
know
across
everything.
A
B
Interesting
well,
I
just
merged
a
PR
this
morning.
It's
not
live
on
the
docs
page.
Yet,
but
it's
in
our
it's
in
the
doctor,
repo
a
master.
We
probably
were
budget
to
live.
Probably
tomorrow,
I.
Imagine
I,
think
that's
when
Schmitt
usually
does
it
so
basically
every
an
a
big
documentation,
big
document
on
testing,
with
different
database
providers
outlining
the
pitfalls
of
using
the
memory
database
and
showing
how
to
use
sequel
right
within
memory
and
then
showing
how
to
also
test
with
your
real
database
provider.
B
How
to
share
that
database
between
different
tests
in
a
site's
thread
safe
way,
so
that
tests
can
still
run
in
parallel,
but
they
won't
trip
over
each
other.
So
yeah,
that's
that's
the
guidance
so
we're
not
removing
the
memory
provider.
We're
not
going
to
do
that
and
there's
too
many
people
using
it
be
just
to
braking
to
remove
it.
To
be
honest,
I
knew
that
was
the
case
when
that
issue
was
filed,
but
the
team
really
really
was
like.
Can
we
remove
it?
Can.
A
B
B
You
can
have
a
both
a
false
sense
of
security
that
your
app
works
when
it
doesn't,
because
it's
not
actually
running
against
the
real
database
that
you
use,
and
you
can
also
run
into
cases
where
you
just
can't
test
something
properly
with
the
in-memory
database,
because
it
doesn't
support
the
feature
that
you
need
to
test.
So
while
it
can
be
useful,
there's
pitfalls
and
that's
kind
of
what
the
document
really
tries
to
outline.
Ok,.
A
C
A
question
about
shadow
properties,
but
it
scrolled
by
and
my
Scrolls,
not
working.
Ok,
let
me
see
well
you're
looking
for
that.
How
does
e-tag
work
under
the
hood
I'll
just
address
that
every
time
you
save
a
document,
the
cosmos
DB,
it
generates
a
new
etag,
and
so,
if
I,
that
e-tag
comes
as
a
payload
when
I
read
it.
So,
if
I
read,
he
tagged
one,
someone
else
updates
it,
it
becomes
e,
take
two
and
then
I
click
Save.
C
A
B
So
yes,
and
no
definitely
have
samples
you
know.
Rick
Anderson
has
his
brilliant
walkthrough
with
ASP
net,
using
either
a
two
pages
or
MVC,
and
that
shows
you
know
good
separations
and
good
practices.
Ef
doesn't
tend
to
be
that
opinionated
about
those
things
itself
and
that's
because
it
can
be
used
in
many
different
ways
in
many
different
applications.
So
it's
more
a
matter
of
kind
of
reading,
that
kind
of
asp,
net
guidance
and
following
what
you
see
there,
I
think-
and
I.
C
Like
to
always
say
the
the
rule
of
lowest
common
denominator,
so
I
like
to
break
out
projects
based
on
shareability.
So
if
I
can
put
my
my
pocos,
my
c-sharp
classes
in
a
class
that
can
be
shared
on
xamarin
on
asp
net
on
WPF
on
whatever,
if
I
can
break
out
my
DB
contacts
to
be
shareable
between
my
my
you
know:
asp
net
project,
maybe
my
blazer
server
project,
etc.
C
That
makes
sense
and
then,
in
your
actual
platform,
your
blazer,
your
asp
net
core,
whatever
that
is
you're
gonna,
have
to
have
a
configuration
step
to
let
dependency
injection
know
it
exists,
but
you
should
have
a
strategy
of
layering
it
because
you
want
to
be
able
to
run,
for
example,
tests
against
your
DB
context
without
necessarily
spinning
up
the
entire
website.
So.
B
It's
not
it's
unrelated
to
that.
So
what
the
shadow
properties,
the
the
the
primary
use
case
for
shadow
properties
is
really
foreign
keys.
That's
that's
essentially
the
main
reason
they
were
introduced,
although
they
actually
are
useful
for
many
other
things
as
Jeremy
showed
us
today,
and
the
idea
is
basically
that
you
know
you
want
you
want
this.
You
need
a
foreign
key
in
your
database
because
that's
how
the
database
manage
it,
but
you
domain
object.
B
So
then,
when
we
update
the
database,
we
know
what
the
FK
value
is
because
we're
tracking
it
in
the
in
the
context,
even
though
the
entity
itself
doesn't
have
it
and
so
with
etags,
you
can
see
it
works
the
same
way.
You
don't
have
to
have
it
exposed
in
your
entity,
but
it's
being
tracked
in
the
context
now
the
thing
to
look
out
for
when
using
shadow
properties
is,
if
you
are
sending
your
entities
back
and
forth
across
a
disconnected.
B
You
know
if
you're
sending
them
to
a
client
and
then
bringing
them
back
you're
going
to
lose
that
information.
So
in
those
situations,
if
you
need
that
information
you
be
reserved,
you
have
to
either
send
it
as
a
hidden
field
or
do
some
or
some
other
thing.
But
that's
that's
the
thing
to
look
out
for
with
shadow
properties.
Okay,.
C
Jeremy,
that's
a
good
one.
It
can
be
used
so
I
again
when
you're,
using
a
certain
platform,
I
like
to
take
advantage
of
the
features
of
that
platform.
One
of
the
nice
things
about
as
your
functions
is
this
system
of
triggers
and
bindings
that
make
it
really
easy
to
interact
with
data
sources
and
let
the
host
manage
lifecycle
and
scope.
So,
having
said
that
to
me,
it
feels
like
a
little
bit
of
overkill
to
use
the
data
framework
if
your
functions
are
really
well
defined.
C
Doing
one
small
task
you're
there,
however,
it
is
possible
people
do
use
it
in
Azure
functions.
We
get
issues
when
it
doesn't
work
the
way
they
want
it
to,
but
it
can
be
successfully
used.
Just
a
question
of.
Are
you
looking
first
at
what
the
platform
provides
out-of-the-box
for
features
that
make
it
easier
for
rapid
development
and
scale?
B
Add
one
more
thing
to
that,
which
is
there
as
your
functions?
Does
some
interesting
things
with
it's
built
the
way
it
builds
and
the
way
it
lays
out
things
like
way,
outs
where
it
puts
binary
files,
for
example,
it
doesn't
necessarily
put
them
in
the
in
the
bin
folder
like
you
might
expect,
and
so
there
are
some
some
gotchas.
If
you
like
we're
going
to
update
some
documentation
on
that
and
also
in
earlier
versions
of
azure
functions,
it
was
easy
to
get
clashes
with
entity
framework
versions
that
they're
making
that
better
in
actual
functions.
B
C
So
that
that's
a
good
one
actually
for
if
we
don't
get
to
all
the
questions
with
our
monthly
entity
framework
community,
stand
up
that
we're
kicking
off
we're
going
to
leave
a
lot
of
time
for
questions
next
month
or
next
week.
Actually
so
I
want
to
put
that
out
there,
but
we
will
be
covering
topics
besides
just
entity
framework
we're
really
looking
at
data
in
the
dotnet
ecosystem,
the
first
one's
going
to
be
mainly
all
entity
framework,
but
we'll
be
tackling
things
like
Oh
data
and
graph
QL.
So
the
answer
is
graph.
C
Ql
is
a
a
way
of
requesting
data
from
a
client
that
is
that
basically
tackles
the
problems
faced
of
I.
Don't
need
everything
and
I
need
security
and
I
need
to
be
able
to
request
certain
shaped
objects.
Maybe
there's
15
properties
I
only
need
to,
but
I
also
want
to
go
three
levels
deep,
so
it
solves
that
that
problem
and
the
interesting
thing
is
because
of
the
way
entity
framework
works
with
exposing
the
ability
to
use,
link
and
use
expressions
to
navigate
the
database.
It's
very
straightforward
for
things
like
Oh
data
and
graph
Kewell
straightforward.
C
No
because
if
you
had
to
write
one
yourself,
but
there
is
a
path
for
an
adapter,
so
most
of
the
as
far
as
I
know
graph
QL
net
and
hot
chocolate,
which
are
the
two
more
popular
graph
QL
net
libraries
that
I'm
familiar
with
I,
believe
they
both
have
adapters
didn'ti
framework
so
that
you
can
stand
up
and
use
graph
QL.
So
the
idea
is,
if
you're,
on
the
server
in
any
framework
you're
done.
C
A
B
We
had
a
dream
that
we
could
make
them
enough
database
diagnostic,
that
it
would
be
useful,
but
they
were
never
really
database
agnostic
in
any
f6
or
any
F
core
and
in
reality,
what
we
found
is
that
it
there's
too
many
differences
and
too
many
tooling
issues
and
too
many
bits
of
complexity,
to
try
and
make
them
agnostic
and
yet
still
fully
support
everything
that
the
different
databases
supports.
So
we've
kind
of
basically
said
what
the
reality
is
that
they're
not
database
agnostic.
B
Now
that
doesn't
mean
that
you
can't,
if
you
want
to
still
write
migrations
that
are
essentially
the
same
with
little
bits
of
you
know
conditional
code
for
different
databases,
but
we're
not
driving
that
as
the
main
scenario,
because
it's
too
easy
to
fall
into
a
pit
of
failure.
If
you
do
that,
and
it's
too
easy
to
not
even
realize
you're
falling
into
a
pit
of
failure
until
it's
too
late
because
things
seem
to
work
and
then
they
don't
so
yeah
that
that's,
it
would
have
been
great
if
we
could
have
fully
agnostic.
B
To
finish
with
okay,
so
so
back
back
almost
years
ago,
11
10
10
10
11
years
ago,
when,
when
we
were
a
group
of
us,
Diego,
Rowan,
myself
and
repeaters,
and
some
people,
I,
Bryce
and
Andrew,
who
were
still
on
the
team,
were
basically
pushing
for
code
first
or
code
only
as
we
called
it
back
then
and
dbcontext
as
in
a
new
api.
That
was
better
than
object
context
for
them.
For
those
who
remember
that,
which,
at
least
when
I
started
on
the
team,
I
was
like.
I
can't
believe
this
anyway.