0:03
so hey everyone and welcome to a new er
0:05
so hey everyone and welcome to a new er
0:05
so hey everyone and welcome to a new er of net development with mongodb at the
0:08
of net development with mongodb at the
0:08
of net development with mongodb at the Third Edition of the software
0:09
Third Edition of the software
0:09
Third Edition of the software architecture conference by cop TV my
0:12
architecture conference by cop TV my
0:12
architecture conference by cop TV my name is rishid paa and I'm a senior
0:14
name is rishid paa and I'm a senior
0:14
name is rishid paa and I'm a senior product manager at mongodb focusing on
0:16
product manager at mongodb focusing on
0:16
product manager at mongodb focusing on the developer experience for net and
0:18
the developer experience for net and
0:18
the developer experience for net and Cesar I am based in Toronto Canada which
0:22
Cesar I am based in Toronto Canada which
0:22
Cesar I am based in Toronto Canada which is home for me since the last two years
0:24
is home for me since the last two years
0:24
is home for me since the last two years before which I spent the last seven
0:26
before which I spent the last seven
0:26
before which I spent the last seven years in the US but I'm originally from
0:28
years in the US but I'm originally from
0:28
years in the US but I'm originally from Mumbai India which is where I was born
0:29
Mumbai India which is where I was born
0:29
Mumbai India which is where I was born in raised I actually started my career
0:32
in raised I actually started my career
0:32
in raised I actually started my career as an engineer working on C so I was um
0:36
as an engineer working on C so I was um
0:36
as an engineer working on C so I was um working in sports Technologies Games Etc
0:39
working in sports Technologies Games Etc
0:39
working in sports Technologies Games Etc helping build AR VR apps mobile apps
0:42
helping build AR VR apps mobile apps
0:42
helping build AR VR apps mobile apps before moving to product management in
0:43
before moving to product management in
0:43
before moving to product management in 2019 so yeah that's a quick summary
0:46
2019 so yeah that's a quick summary
0:46
2019 so yeah that's a quick summary about
0:49
me okay enough about me let's talk about
0:52
me okay enough about me let's talk about
0:52
me okay enough about me let's talk about what is mongodb and what is mongodb
0:54
what is mongodb and what is mongodb
0:54
what is mongodb and what is mongodb atlas for those of you who may not be
0:55
atlas for those of you who may not be
0:56
atlas for those of you who may not be aware with
0:58
aware with it so firstly Mong DB is a document
1:00
it so firstly Mong DB is a document
1:01
it so firstly Mong DB is a document database so it's similar to a key Value
1:03
database so it's similar to a key Value
1:03
database so it's similar to a key Value Store however it supports a wide variety
1:05
Store however it supports a wide variety
1:05
Store however it supports a wide variety of data types including strings arrays
1:08
of data types including strings arrays
1:08
of data types including strings arrays objects making it more versatile unlike
1:11
objects making it more versatile unlike
1:11
objects making it more versatile unlike traditional relational databases which
1:13
traditional relational databases which
1:13
traditional relational databases which store data in tables rows and columns
1:15
store data in tables rows and columns
1:15
store data in tables rows and columns mongodb uses Bon which is binary Json um
1:19
mongodb uses Bon which is binary Json um
1:19
mongodb uses Bon which is binary Json um the document oriented approach allows
1:21
the document oriented approach allows
1:21
the document oriented approach allows for a more natural and expressive way to
1:23
for a more natural and expressive way to
1:23
for a more natural and expressive way to store data and can easily accommodate
1:25
store data and can easily accommodate
1:25
store data and can easily accommodate hierarchical relationships and array
1:27
hierarchical relationships and array
1:27
hierarchical relationships and array based data as well
1:30
based data as well mongodb is designed to meet the needs of
1:32
mongodb is designed to meet the needs of
1:32
mongodb is designed to meet the needs of different audiences so if you're looking
1:34
different audiences so if you're looking
1:34
different audiences so if you're looking for a personal project you can use it or
1:36
for a personal project you can use it or
1:36
for a personal project you can use it or if you're looking to build Enterprise
1:38
if you're looking to build Enterprise
1:38
if you're looking to build Enterprise grade applications in different
1:39
grade applications in different
1:40
grade applications in different Industries like healthcare Retail
1:42
Industries like healthcare Retail
1:42
Industries like healthcare Retail Finance Etc you can do so um using
1:46
Finance Etc you can do so um using
1:46
Finance Etc you can do so um using mongodb one of the key features mongodb
1:49
mongodb one of the key features mongodb
1:49
mongodb one of the key features mongodb has is its flexible schema so unlike
1:51
has is its flexible schema so unlike
1:51
has is its flexible schema so unlike relational databases that require you to
1:53
relational databases that require you to
1:53
relational databases that require you to define a schema before storing or
1:55
define a schema before storing or
1:55
define a schema before storing or inserting the data mongodb allows you to
1:57
inserting the data mongodb allows you to
1:57
inserting the data mongodb allows you to store documents without prior definition
1:59
store documents without prior definition
1:59
store documents without prior definition of or a
2:01
of or a structure lastly mongod supports
2:04
structure lastly mongod supports
2:04
structure lastly mongod supports horizontal scaling so it does so through
2:06
horizontal scaling so it does so through
2:06
horizontal scaling so it does so through what is known as sharding so it allows
2:08
what is known as sharding so it allows
2:08
what is known as sharding so it allows you to distribute your data throughout a
2:10
you to distribute your data throughout a
2:10
you to distribute your data throughout a cluster of machines this approach can
2:12
cluster of machines this approach can
2:12
cluster of machines this approach can improve performance and allows the
2:14
improve performance and allows the
2:14
improve performance and allows the database to grow exponentially as the
2:16
database to grow exponentially as the
2:16
database to grow exponentially as the users needs are growing and makes it
2:18
users needs are growing and makes it
2:18
users needs are growing and makes it suitable for applications which require
2:20
suitable for applications which require
2:20
suitable for applications which require large data sets or high throughput
2:24
requirements okay so you know what
2:26
requirements okay so you know what
2:26
requirements okay so you know what mongodb is what is mongodb atlas um
2:29
mongodb is what is mongodb atlas um
2:29
mongodb is what is mongodb atlas um mongodb Atlas is a fully managed Cloud
2:32
mongodb Atlas is a fully managed Cloud
2:32
mongodb Atlas is a fully managed Cloud database that handles the complexity of
2:34
database that handles the complexity of
2:34
database that handles the complexity of deploying managing and healing your uh
2:37
deploying managing and healing your uh
2:37
deploying managing and healing your uh Cloud deployments on any cloud service
2:39
Cloud deployments on any cloud service
2:39
Cloud deployments on any cloud service provider of your
2:41
provider of your choice it also offers sdks or drivers
2:44
choice it also offers sdks or drivers
2:44
choice it also offers sdks or drivers which facilitate the development of
2:46
which facilitate the development of
2:46
which facilitate the development of applications across a range of devices
2:48
applications across a range of devices
2:48
applications across a range of devices so these help you developers integrate
2:51
so these help you developers integrate
2:51
so these help you developers integrate um it mongodb Atlas into your
2:53
um it mongodb Atlas into your
2:53
um it mongodb Atlas into your application allowing for seamless data
2:55
application allowing for seamless data
2:55
application allowing for seamless data synchronization and manipulation um and
2:58
synchronization and manipulation um and
2:58
synchronization and manipulation um and it works across different devices or
3:00
it works across different devices or
3:00
it works across different devices or different platforms such as mobile and
3:03
different platforms such as mobile and
3:03
different platforms such as mobile and iot we also have charts so charts is a
3:06
iot we also have charts so charts is a
3:06
iot we also have charts so charts is a feature which allows you to uh create
3:09
feature which allows you to uh create
3:09
feature which allows you to uh create visual representations of your data
3:10
visual representations of your data
3:11
visual representations of your data stored in mongodb so you don't have to
3:13
stored in mongodb so you don't have to
3:13
stored in mongodb so you don't have to go to any third party tool it's fully
3:15
go to any third party tool it's fully
3:15
go to any third party tool it's fully integrated into the platform and you can
3:17
integrated into the platform and you can
3:17
integrated into the platform and you can generate charts graphs for data analysis
3:19
generate charts graphs for data analysis
3:20
generate charts graphs for data analysis and Reporting without any need for third
3:22
and Reporting without any need for third
3:22
and Reporting without any need for third party
3:23
party tools we also have analytics so
3:26
tools we also have analytics so
3:26
tools we also have analytics so analytics allows you to perform complex
3:28
analytics allows you to perform complex
3:28
analytics allows you to perform complex queries and aggregate operation s for
3:30
queries and aggregate operation s for
3:30
queries and aggregate operation s for your data and it's optimized for
3:32
your data and it's optimized for
3:32
your data and it's optimized for performance and scale so you can make it
3:35
performance and scale so you can make it
3:35
performance and scale so you can make it makes it easier for your organization to
3:37
makes it easier for your organization to
3:37
makes it easier for your organization to gain insights on large volumes of data
3:40
gain insights on large volumes of data
3:40
gain insights on large volumes of data um in real
3:42
um in real time and lastly we also have search so
3:45
time and lastly we also have search so
3:46
time and lastly we also have search so Atlas search is a fully uh built-in teex
3:49
Atlas search is a fully uh built-in teex
3:49
Atlas search is a fully uh built-in teex search capability engine which is built
3:51
search capability engine which is built
3:51
search capability engine which is built on Apachi Lucine um it helps you perform
3:54
on Apachi Lucine um it helps you perform
3:54
on Apachi Lucine um it helps you perform Rich teex search queries um without the
3:57
Rich teex search queries um without the
3:57
Rich teex search queries um without the need for a separate Plugin or an engine
3:59
need for a separate Plugin or an engine
3:59
need for a separate Plugin or an engine so this integrated solution helps you
4:02
so this integrated solution helps you
4:02
so this integrated solution helps you build search into your application by
4:04
build search into your application by
4:04
build search into your application by using mongodb
4:07
Atlas Okay so we've heard what mongodb
4:10
Atlas Okay so we've heard what mongodb
4:11
Atlas Okay so we've heard what mongodb is what mongodb Atlas is now I want to
4:12
is what mongodb Atlas is now I want to
4:12
is what mongodb Atlas is now I want to touch on what is Entity framework core
4:15
touch on what is Entity framework core
4:15
touch on what is Entity framework core or EF
4:17
or EF core so EF core is the most popular
4:19
core so EF core is the most popular
4:20
core so EF core is the most popular object relational mapper or or in the
4:22
object relational mapper or or in the
4:22
object relational mapper or or in the net ecosystem since it was introduced in
4:24
net ecosystem since it was introduced in
4:24
net ecosystem since it was introduced in 2019 it has really become the orm of
4:27
2019 it has really become the orm of
4:27
2019 it has really become the orm of choice for C developers and has widely
4:29
choice for C developers and has widely
4:29
choice for C developers and has widely gained popularity across these years um
4:32
gained popularity across these years um
4:32
gained popularity across these years um efcore is compatible with different
4:34
efcore is compatible with different
4:34
efcore is compatible with different databases and it can do so through
4:36
databases and it can do so through
4:36
databases and it can do so through plug-in libraries called database
4:37
plug-in libraries called database
4:37
plug-in libraries called database providers so you can switch between
4:40
providers so you can switch between
4:40
providers so you can switch between different database providers by uh
4:42
different database providers by uh
4:42
different database providers by uh switching the Plug-In or the provider in
4:44
switching the Plug-In or the provider in
4:45
switching the Plug-In or the provider in your application this should not be
4:47
your application this should not be
4:47
your application this should not be considered a dropin replacement though
4:49
considered a dropin replacement though
4:49
considered a dropin replacement though because each provider might work
4:50
because each provider might work
4:50
because each provider might work slightly
4:51
slightly differently EF core also uses a language
4:54
differently EF core also uses a language
4:54
differently EF core also uses a language integrated query or link syntax which
4:56
integrated query or link syntax which
4:56
integrated query or link syntax which allows you to use C to write strongly
4:58
allows you to use C to write strongly
4:58
allows you to use C to write strongly typed query
5:00
typed query and the main reason why efcore is so
5:02
and the main reason why efcore is so
5:02
and the main reason why efcore is so popular is because of its ease of use
5:04
popular is because of its ease of use
5:04
popular is because of its ease of use and the wide range of capabilities which
5:06
and the wide range of capabilities which
5:06
and the wide range of capabilities which include entity splitting lazy loading
5:09
include entity splitting lazy loading
5:09
include entity splitting lazy loading custom conventions Etc among many
5:14
others okay so why is all of this
5:16
others okay so why is all of this
5:16
others okay so why is all of this important I want to quickly touch on
5:18
important I want to quickly touch on
5:18
important I want to quickly touch on some of the numbers here which are taken
5:20
some of the numbers here which are taken
5:20
some of the numbers here which are taken from recent surveys public surveys um
5:23
from recent surveys public surveys um
5:23
from recent surveys public surveys um one thing that we noticed is 39% of C
5:27
one thing that we noticed is 39% of C
5:27
one thing that we noticed is 39% of C developers said that they have used efco
5:29
developers said that they have used efco
5:29
developers said that they have used efco in some capacity so they're familiar
5:31
in some capacity so they're familiar
5:31
in some capacity so they're familiar with it it's one of the most popular
5:32
with it it's one of the most popular
5:33
with it it's one of the most popular Technologies in the net
5:34
Technologies in the net
5:34
Technologies in the net ecosystem um mongodb was also the number
5:37
ecosystem um mongodb was also the number
5:37
ecosystem um mongodb was also the number one nosql database for cop developers
5:40
one nosql database for cop developers
5:40
one nosql database for cop developers and a lot of developers who have not
5:42
and a lot of developers who have not
5:42
and a lot of developers who have not used mongodb or are not familiar with it
5:44
used mongodb or are not familiar with it
5:44
used mongodb or are not familiar with it did in say that they want to try it
5:47
did in say that they want to try it
5:47
did in say that they want to try it out so when you put all of this together
5:50
out so when you put all of this together
5:50
out so when you put all of this together um we started to collaborate with the
5:53
um we started to collaborate with the
5:53
um we started to collaborate with the team at Microsoft and one of the most
5:55
team at Microsoft and one of the most
5:55
team at Microsoft and one of the most requested features for efcore was a
5:57
requested features for efcore was a
5:57
requested features for efcore was a mongodb efcore provider but for us as
5:59
mongodb efcore provider but for us as
6:00
mongodb efcore provider but for us as well we got a lot of requests about
6:02
well we got a lot of requests about
6:02
well we got a lot of requests about having a provider that works with
6:04
having a provider that works with
6:04
having a provider that works with efcore so considering all the numbers
6:07
efcore so considering all the numbers
6:07
efcore so considering all the numbers and you know the requests that we had
6:10
and you know the requests that we had
6:10
and you know the requests that we had the mongod EF core provider comes into
6:12
the mongod EF core provider comes into
6:12
the mongod EF core provider comes into existence and it really helps bridge
6:14
existence and it really helps bridge
6:14
existence and it really helps bridge this Gap that we've just looked at so in
6:16
this Gap that we've just looked at so in
6:17
this Gap that we've just looked at so in the past C developers could use mongodb
6:19
the past C developers could use mongodb
6:19
the past C developers could use mongodb C driver but it didn't have first party
6:21
C driver but it didn't have first party
6:21
C driver but it didn't have first party support for EF core so this meant a lack
6:24
support for EF core so this meant a lack
6:24
support for EF core so this meant a lack of official support or backing um for
6:26
of official support or backing um for
6:26
of official support or backing um for efcore if you were working with mongodb
6:29
efcore if you were working with mongodb
6:29
efcore if you were working with mongodb with the official mongodb provider now
6:32
with the official mongodb provider now
6:32
with the official mongodb provider now generally available since May this year
6:34
generally available since May this year
6:34
generally available since May this year um you can confidently use C and EF core
6:37
um you can confidently use C and EF core
6:37
um you can confidently use C and EF core when you're building for production
6:38
when you're building for production
6:38
when you're building for production grade workloads with mongodb and EF core
6:41
grade workloads with mongodb and EF core
6:41
grade workloads with mongodb and EF core and like I said we've been collaborating
6:43
and like I said we've been collaborating
6:43
and like I said we've been collaborating with the Microsoft team to bring this
6:44
with the Microsoft team to bring this
6:44
with the Microsoft team to bring this provider to life um and we're happy that
6:48
provider to life um and we're happy that
6:48
provider to life um and we're happy that we launched it and we are going to
6:49
we launched it and we are going to
6:49
we launched it and we are going to evolve it with newer capabilities as we
6:53
progress now what are the benefits of
6:56
progress now what are the benefits of
6:56
progress now what are the benefits of the mongod BF Cod provider the first one
6:59
the mongod BF Cod provider the first one
6:59
the mongod BF Cod provider the first one is it allows you to leverage familiar
7:01
is it allows you to leverage familiar
7:01
is it allows you to leverage familiar apis query paradigms like link and
7:03
apis query paradigms like link and
7:03
apis query paradigms like link and design patterns the second most
7:06
design patterns the second most
7:06
design patterns the second most important thing is there is no Cloud
7:08
important thing is there is no Cloud
7:08
important thing is there is no Cloud vendor lock in now what this means is if
7:10
vendor lock in now what this means is if
7:10
vendor lock in now what this means is if you're using mongodb Atlas you can use
7:12
you're using mongodb Atlas you can use
7:12
you're using mongodb Atlas you can use the cloud provider of your choice be it
7:14
the cloud provider of your choice be it
7:14
the cloud provider of your choice be it Azure AWS or
7:17
Azure AWS or gcp um and since the EF core provider is
7:20
gcp um and since the EF core provider is
7:20
gcp um and since the EF core provider is built on top of uh the C driver which is
7:23
built on top of uh the C driver which is
7:23
built on top of uh the C driver which is architectural choice that we made it
7:25
architectural choice that we made it
7:25
architectural choice that we made it allows you to use capabilities that the
7:27
allows you to use capabilities that the
7:27
allows you to use capabilities that the C driver exposes which might not be
7:29
C driver exposes which might not be
7:29
C driver exposes which might not be available in EF Cod like Atlas search
7:32
available in EF Cod like Atlas search
7:32
available in EF Cod like Atlas search Atlas Vector search for AI applications
7:34
Atlas Vector search for AI applications
7:34
Atlas Vector search for AI applications which I'll touch on a little bit later
7:37
which I'll touch on a little bit later
7:37
which I'll touch on a little bit later and index management and other admin
7:38
and index management and other admin
7:38
and index management and other admin type
7:44
capabilities okay all right so now let's
7:47
capabilities okay all right so now let's
7:47
capabilities okay all right so now let's take a look at a quick demo about how we
7:49
take a look at a quick demo about how we
7:49
take a look at a quick demo about how we can set up EF core to use with mongodb
7:52
can set up EF core to use with mongodb
7:52
can set up EF core to use with mongodb Atlas and how we can perform basic crud
7:54
Atlas and how we can perform basic crud
7:54
Atlas and how we can perform basic crud operations and then also show a glimpse
7:57
operations and then also show a glimpse
7:57
operations and then also show a glimpse of the index management capability that
7:59
of the index management capability that
7:59
of the index management capability that just spoke about so hope everyone's
8:01
just spoke about so hope everyone's
8:01
just spoke about so hope everyone's excited to look at
8:06
this okay I'm going to be looking at my
8:08
this okay I'm going to be looking at my
8:08
this okay I'm going to be looking at my other monitor but what you see on the
8:10
other monitor but what you see on the
8:11
other monitor but what you see on the right hand side here is um madp compass
8:15
right hand side here is um madp compass
8:16
right hand side here is um madp compass and it's essentially the GUI for working
8:18
and it's essentially the GUI for working
8:18
and it's essentially the GUI for working with mongodb it's a desktop app and on
8:20
with mongodb it's a desktop app and on
8:20
with mongodb it's a desktop app and on the left is just a terminal so we'll be
8:22
the left is just a terminal so we'll be
8:22
the left is just a terminal so we'll be working with a basic.net console
8:24
working with a basic.net console
8:24
working with a basic.net console application in this example
8:29
so if you want to add the EF code
8:31
so if you want to add the EF code
8:31
so if you want to add the EF code provider to a basic project all you need
8:33
provider to a basic project all you need
8:33
provider to a basic project all you need to do is use the net ad package command
8:36
to do is use the net ad package command
8:36
to do is use the net ad package command um and it will add the EF code provider
8:38
um and it will add the EF code provider
8:38
um and it will add the EF code provider to your project along with any
8:39
to your project along with any
8:39
to your project along with any dependencies needed now we switch over
8:42
dependencies needed now we switch over
8:42
dependencies needed now we switch over to our basic you know console
8:45
to our basic you know console
8:45
to our basic you know console application and this is what you would
8:47
application and this is what you would
8:47
application and this is what you would do in your program.cs file for
8:48
do in your program.cs file for
8:49
do in your program.cs file for connecting to any database so you just
8:51
connecting to any database so you just
8:51
connecting to any database so you just create a client you have the database
8:53
create a client you have the database
8:53
create a client you have the database itself and then the important thing here
8:55
itself and then the important thing here
8:55
itself and then the important thing here for EF core is the DB context so you see
8:58
for EF core is the DB context so you see
8:58
for EF core is the DB context so you see here we have our own DB contacts called
9:00
here we have our own DB contacts called
9:00
here we have our own DB contacts called movies DB contacts because in this
9:03
movies DB contacts because in this
9:03
movies DB contacts because in this example we're using um sample data set
9:05
example we're using um sample data set
9:05
example we're using um sample data set which is available with that list so we
9:07
which is available with that list so we
9:07
which is available with that list so we using the sample movies collection um if
9:09
using the sample movies collection um if
9:09
using the sample movies collection um if you get started with that list on the
9:11
you get started with that list on the
9:11
you get started with that list on the free tier you have access to all the
9:12
free tier you have access to all the
9:12
free tier you have access to all the sample data that you need um now we'll
9:16
sample data that you need um now we'll
9:16
sample data that you need um now we'll go into the create function itself so we
9:18
go into the create function itself so we
9:18
go into the create function itself so we were looking at the program.cs file now
9:20
were looking at the program.cs file now
9:20
were looking at the program.cs file now we looking at the movies DB context file
9:23
we looking at the movies DB context file
9:23
we looking at the movies DB context file so you'll see that it inher inherits
9:25
so you'll see that it inher inherits
9:25
so you'll see that it inher inherits from DB context which is available with
9:27
from DB context which is available with
9:27
from DB context which is available with the EF core package
9:29
the EF core package um and we have our own create function
9:32
um and we have our own create function
9:32
um and we have our own create function here um which takes in the database now
9:35
here um which takes in the database now
9:35
here um which takes in the database now all you need to do to connect to Atlas
9:38
all you need to do to connect to Atlas
9:38
all you need to do to connect to Atlas is use the function called use mongod DP
9:42
is use the function called use mongod DP
9:42
is use the function called use mongod DP on your DB context options Builder and
9:45
on your DB context options Builder and
9:45
on your DB context options Builder and it takes in the database object with the
9:47
it takes in the database object with the
9:47
it takes in the database object with the database client and the database name
9:50
database client and the database name
9:50
database client and the database name once you do that that's pretty much it
9:53
once you do that that's pretty much it
9:53
once you do that that's pretty much it for connecting to Atlas the only other
9:56
for connecting to Atlas the only other
9:56
for connecting to Atlas the only other thing worth mentioning here is we also
9:58
thing worth mentioning here is we also
9:58
thing worth mentioning here is we also have the Constructor which is the
10:01
have the Constructor which is the
10:01
have the Constructor which is the default one and we just in it from the
10:04
default one and we just in it from the
10:04
default one and we just in it from the base now the other thing that we'll be
10:06
base now the other thing that we'll be
10:06
base now the other thing that we'll be doing here is defining the DB set so we
10:08
doing here is defining the DB set so we
10:09
doing here is defining the DB set so we have our own entity called movies and we
10:11
have our own entity called movies and we
10:11
have our own entity called movies and we need to Define that we're using a DB set
10:14
need to Define that we're using a DB set
10:14
need to Define that we're using a DB set called movies um and we look at the
10:16
called movies um and we look at the
10:16
called movies um and we look at the model class quickly um but you just have
10:18
model class quickly um but you just have
10:18
model class quickly um but you just have to Define it here in your DB
10:22
context let's look at the movies um
10:26
context let's look at the movies um
10:26
context let's look at the movies um model class so you'll see here we have
10:28
model class so you'll see here we have
10:28
model class so you'll see here we have different fields defined uh in our model
10:30
different fields defined uh in our model
10:30
different fields defined uh in our model class called ID title year plot rated
10:33
class called ID title year plot rated
10:33
class called ID title year plot rated Etc we also have up top an attribute
10:36
Etc we also have up top an attribute
10:36
Etc we also have up top an attribute which is a collections attribute so the
10:39
which is a collections attribute so the
10:39
which is a collections attribute so the thing highlighted on top what it does is
10:41
thing highlighted on top what it does is
10:41
thing highlighted on top what it does is it tells uh the efcore provider that
10:45
it tells uh the efcore provider that
10:45
it tells uh the efcore provider that we're going to be mapping our movies DB
10:47
we're going to be mapping our movies DB
10:47
we're going to be mapping our movies DB side of movies entities into a
10:49
side of movies entities into a
10:49
side of movies entities into a collection similar to a table in a SQL
10:51
collection similar to a table in a SQL
10:51
collection similar to a table in a SQL database and all the names here are not
10:55
database and all the names here are not
10:55
database and all the names here are not shown but they are defined in a constant
10:57
shown but they are defined in a constant
10:57
shown but they are defined in a constant file here so be the collection name the
10:59
file here so be the collection name the
10:59
file here so be the collection name the name of the database the connection
11:01
name of the database the connection
11:01
name of the database the connection string you can do so directly as well
11:03
string you can do so directly as well
11:03
string you can do so directly as well but just for the sake of this demo we've
11:05
but just for the sake of this demo we've
11:05
but just for the sake of this demo we've put it in a constants
11:10
file the other important thing to note
11:13
file the other important thing to note
11:13
file the other important thing to note here is if you see the movie's um model
11:17
here is if you see the movie's um model
11:17
here is if you see the movie's um model class everything here is in Pascal case
11:21
class everything here is in Pascal case
11:21
class everything here is in Pascal case um and all the fields in the database
11:23
um and all the fields in the database
11:23
um and all the fields in the database initially when we were looking at
11:24
initially when we were looking at
11:24
initially when we were looking at Compass you'll notice here are in camel
11:27
Compass you'll notice here are in camel
11:27
Compass you'll notice here are in camel case so now what we can do is um create
11:32
case so now what we can do is um create
11:32
case so now what we can do is um create configure our conventions so what that
11:34
configure our conventions so what that
11:34
configure our conventions so what that does we're going to uncomment this part
11:38
does we're going to uncomment this part
11:38
does we're going to uncomment this part what what this does is it tells the EF
11:40
what what this does is it tells the EF
11:40
what what this does is it tells the EF core provider that we're going to be
11:42
core provider that we're going to be
11:42
core provider that we're going to be using the camel case convention um which
11:45
using the camel case convention um which
11:45
using the camel case convention um which allows to map the fields in the database
11:47
allows to map the fields in the database
11:47
allows to map the fields in the database to the model class so for each and every
11:50
to the model class so for each and every
11:50
to the model class so for each and every field we don't need to do anything
11:51
field we don't need to do anything
11:51
field we don't need to do anything explicitly again and again um we just
11:54
explicitly again and again um we just
11:54
explicitly again and again um we just need to do this once and this mapping
11:55
need to do this once and this mapping
11:55
need to do this once and this mapping will be taken care of by the efo
11:57
will be taken care of by the efo
11:57
will be taken care of by the efo provider
12:00
provider so we just make sure we have the
12:02
so we just make sure we have the
12:02
so we just make sure we have the conventions added we Define the
12:04
conventions added we Define the
12:04
conventions added we Define the convention and that's pretty much
12:09
it so going back to our program.cs file
12:12
it so going back to our program.cs file
12:12
it so going back to our program.cs file now we're going to do a basic read so we
12:14
now we're going to do a basic read so we
12:15
now we're going to do a basic read so we have a lot of movies in our database um
12:17
have a lot of movies in our database um
12:17
have a lot of movies in our database um what I think around
12:19
what I think around 20,000 what we're going to do is we're
12:21
20,000 what we're going to do is we're
12:21
20,000 what we're going to do is we're going to like write a query we using
12:24
going to like write a query we using
12:24
going to like write a query we using link here so we just doing db. movies.
12:27
link here so we just doing db. movies.
12:27
link here so we just doing db. movies. where and we're going to find mov mov
12:29
where and we're going to find mov mov
12:29
where and we're going to find mov mov from the comedy genre we will find
12:31
from the comedy genre we will find
12:32
from the comedy genre we will find movies that start with an A and we order
12:34
movies that start with an A and we order
12:34
movies that start with an A and we order by descending with the year field and
12:37
by descending with the year field and
12:37
by descending with the year field and once we have our results we're going to
12:40
once we have our results we're going to
12:40
once we have our results we're going to take the first five results and then try
12:42
take the first five results and then try
12:42
take the first five results and then try to print them um and in the movies class
12:44
to print them um and in the movies class
12:44
to print them um and in the movies class itself we had a two string function I
12:51
think which allows you
12:54
think which allows you
12:54
think which allows you to just print print the
12:57
to just print print the
12:57
to just print print the movies then we go okay didn't want to go
13:00
movies then we go okay didn't want to go
13:00
movies then we go okay didn't want to go into too much detail there but just in
13:02
into too much detail there but just in
13:02
into too much detail there but just in case anyone wonders how is this being
13:04
case anyone wonders how is this being
13:04
case anyone wonders how is this being logged um so now we're going to just run
13:06
logged um so now we're going to just run
13:06
logged um so now we're going to just run this project let's see if we get our
13:08
this project let's see if we get our
13:08
this project let's see if we get our movies
13:14
back okay perfect so you can see here in
13:17
back okay perfect so you can see here in
13:17
back okay perfect so you can see here in the log um we got our five movies a
13:20
the log um we got our five movies a
13:20
the log um we got our five movies a movie can have multiple genres so we
13:22
movie can have multiple genres so we
13:22
movie can have multiple genres so we asked for comedy movie so we have all
13:25
asked for comedy movie so we have all
13:25
asked for comedy movie so we have all the movies that have the genre as comedy
13:27
the movies that have the genre as comedy
13:27
the movies that have the genre as comedy they start with an a um they are ordered
13:31
they start with an a um they are ordered
13:31
they start with an a um they are ordered in descending order by the year and we
13:33
in descending order by the year and we
13:33
in descending order by the year and we also have some awards or nominations
13:35
also have some awards or nominations
13:35
also have some awards or nominations listed here so this is helpful but what
13:37
listed here so this is helpful but what
13:37
listed here so this is helpful but what if you want to see more logs what if you
13:39
if you want to see more logs what if you
13:39
if you want to see more logs what if you want to see what's happening behind the
13:41
want to see what's happening behind the
13:41
want to see what's happening behind the scenes with the provider and um how is
13:44
scenes with the provider and um how is
13:44
scenes with the provider and um how is it communicating with mongodb so if you
13:46
it communicating with mongodb so if you
13:46
it communicating with mongodb so if you want to do that we go back to our DB
13:48
want to do that we go back to our DB
13:49
want to do that we go back to our DB context class we can enable logging here
13:52
context class we can enable logging here
13:52
context class we can enable logging here which is a pretty cool feature and you
13:54
which is a pretty cool feature and you
13:54
which is a pretty cool feature and you can use any logger but be using just
13:56
can use any logger but be using just
13:56
can use any logger but be using just console. rightline and you have to
13:58
console. rightline and you have to
13:58
console. rightline and you have to enable sensitive data logging just in
14:00
enable sensitive data logging just in
14:00
enable sensitive data logging just in case there's any PI because this will be
14:02
case there's any PI because this will be
14:02
case there's any PI because this will be logged into the console once we do that
14:05
logged into the console once we do that
14:05
logged into the console once we do that let's just save and then rerun our
14:08
let's just save and then rerun our
14:08
let's just save and then rerun our program and what we'll see here is we do
14:11
program and what we'll see here is we do
14:11
program and what we'll see here is we do set see the results um for what we
14:13
set see the results um for what we
14:13
set see the results um for what we wanted but we see much more details than
14:15
wanted but we see much more details than
14:15
wanted but we see much more details than we saw before and I'll show one more
14:18
we saw before and I'll show one more
14:18
we saw before and I'll show one more interesting
14:21
thing so we see a lot of logs we just
14:24
thing so we see a lot of logs we just
14:24
thing so we see a lot of logs we just browsing through it and you can see all
14:27
browsing through it and you can see all
14:27
browsing through it and you can see all the communication and all the logs uh
14:29
the communication and all the logs uh
14:29
the communication and all the logs uh being seen in the console and you see
14:31
being seen in the console and you see
14:31
being seen in the console and you see this sample. mflix movies. agregate the
14:34
this sample. mflix movies. agregate the
14:34
this sample. mflix movies. agregate the highlighted line here what is it doing
14:37
highlighted line here what is it doing
14:37
highlighted line here what is it doing so this is actually the query that is
14:39
so this is actually the query that is
14:39
so this is actually the query that is being sent to the server So based on the
14:41
being sent to the server So based on the
14:41
being sent to the server So based on the link query that we wrote in our uh
14:44
link query that we wrote in our uh
14:44
link query that we wrote in our uh program.cs file you'll see we have a
14:46
program.cs file you'll see we have a
14:46
program.cs file you'll see we have a match stage which matches the genre the
14:48
match stage which matches the genre the
14:48
match stage which matches the genre the title starting with an a we have a sort
14:52
title starting with an a we have a sort
14:52
title starting with an a we have a sort with the year field in descending order
14:54
with the year field in descending order
14:54
with the year field in descending order we have a limit to take the first five
14:56
we have a limit to take the first five
14:56
we have a limit to take the first five results and it's essentially converting
14:58
results and it's essentially converting
14:58
results and it's essentially converting it to an aggregate pipeline so you have
15:00
it to an aggregate pipeline so you have
15:00
it to an aggregate pipeline so you have a clear view of the executed uh mql with
15:03
a clear view of the executed uh mql with
15:03
a clear view of the executed uh mql with the server so that's pretty neat you can
15:05
the server so that's pretty neat you can
15:05
the server so that's pretty neat you can see what queries being sent to the
15:08
see what queries being sent to the
15:08
see what queries being sent to the server okay so now we've seen how basic
15:12
server okay so now we've seen how basic
15:12
server okay so now we've seen how basic query Works let's take a look at how we
15:15
query Works let's take a look at how we
15:15
query Works let's take a look at how we can use the index management feature I
15:17
can use the index management feature I
15:17
can use the index management feature I just spoke about so what we're doing
15:20
just spoke about so what we're doing
15:20
just spoke about so what we're doing here is we're leveraging the
15:21
here is we're leveraging the
15:22
here is we're leveraging the capabilities of the driver um I
15:23
capabilities of the driver um I
15:23
capabilities of the driver um I mentioned that you know the EF code
15:25
mentioned that you know the EF code
15:25
mentioned that you know the EF code provider is built on top of the driver
15:27
provider is built on top of the driver
15:27
provider is built on top of the driver so we are reusing the database or the
15:29
so we are reusing the database or the
15:29
so we are reusing the database or the client here um that we defined
15:32
client here um that we defined
15:32
client here um that we defined initially and we're just defining the
15:36
initially and we're just defining the
15:36
initially and we're just defining the convention here again which I'll explain
15:38
convention here again which I'll explain
15:38
convention here again which I'll explain why and we're creating a movies in a new
15:41
why and we're creating a movies in a new
15:41
why and we're creating a movies in a new index here on the title and genres field
15:44
index here on the title and genres field
15:44
index here on the title and genres field so we are working with the title and
15:46
so we are working with the title and
15:46
so we are working with the title and genres field in our query I want my
15:48
genres field in our query I want my
15:48
genres field in our query I want my query to be optimized so I need to
15:49
query to be optimized so I need to
15:49
query to be optimized so I need to create an index for it so this is just
15:52
create an index for it so this is just
15:52
create an index for it so this is just the driver code to create the index and
15:54
the driver code to create the index and
15:54
the driver code to create the index and you you'll see here create one async and
15:57
you you'll see here create one async and
15:57
you you'll see here create one async and this takes in the movies and definition
15:59
this takes in the movies and definition
15:59
this takes in the movies and definition that you want to create it's a compound
16:01
that you want to create it's a compound
16:01
that you want to create it's a compound index and we're doing it in ascending
16:03
index and we're doing it in ascending
16:03
index and we're doing it in ascending order for the title and gen field coming
16:06
order for the title and gen field coming
16:06
order for the title and gen field coming back to the convention like why are we
16:08
back to the convention like why are we
16:08
back to the convention like why are we defining the convention again when we
16:10
defining the convention again when we
16:10
defining the convention again when we defined it already um in the DB context
16:13
defined it already um in the DB context
16:13
defined it already um in the DB context so the important thing to note here is
16:16
so the important thing to note here is
16:16
so the important thing to note here is that this is for the driver so the efco
16:18
that this is for the driver so the efco
16:18
that this is for the driver so the efco provider has its own data mapping for
16:21
provider has its own data mapping for
16:21
provider has its own data mapping for the model and that's why we need to do
16:23
the model and that's why we need to do
16:23
the model and that's why we need to do it for the EF Cod provider separately in
16:26
it for the EF Cod provider separately in
16:26
it for the EF Cod provider separately in the DB context but if we're using any of
16:29
the DB context but if we're using any of
16:29
the DB context but if we're using any of the capabilities of the C driver then we
16:31
the capabilities of the C driver then we
16:31
the capabilities of the C driver then we need to do it for the driver as well but
16:34
need to do it for the driver as well but
16:34
need to do it for the driver as well but you only need to do it once so now we've
16:36
you only need to do it once so now we've
16:36
you only need to do it once so now we've done
16:38
done that just to make sure that we're going
16:41
that just to make sure that we're going
16:41
that just to make sure that we're going to call that a task here and then just
16:43
to call that a task here and then just
16:43
to call that a task here and then just to make sure that the indexes are
16:45
to make sure that the indexes are
16:45
to make sure that the indexes are actually created we'll go in and check
16:47
actually created we'll go in and check
16:47
actually created we'll go in and check does this index exist already or what
16:49
does this index exist already or what
16:49
does this index exist already or what indexes exist so going back to Compass I
16:52
indexes exist so going back to Compass I
16:52
indexes exist so going back to Compass I see that there's an ID index which is
16:55
see that there's an ID index which is
16:55
see that there's an ID index which is created by default and then there's a
16:56
created by default and then there's a
16:56
created by default and then there's a separate index I would have created
16:58
separate index I would have created
16:58
separate index I would have created before on the plot field but not what we
17:00
before on the plot field but not what we
17:00
before on the plot field but not what we want um for the title and genres so
17:03
want um for the title and genres so
17:03
want um for the title and genres so let's run this
17:12
program we have not uh
17:16
G any by looking at Compass
17:22
again okay we're going to do a
17:25
again okay we're going to do a
17:25
again okay we're going to do a refresh perfect we see titlecore onecore
17:29
refresh perfect we see titlecore onecore
17:29
refresh perfect we see titlecore onecore genres _ one so it did create an index
17:31
genres _ one so it did create an index
17:31
genres _ one so it did create an index for us and you can also see the title
17:33
for us and you can also see the title
17:33
for us and you can also see the title and genres field here with an up Arrow
17:36
and genres field here with an up Arrow
17:36
and genres field here with an up Arrow because we wanted it in ascending order
17:38
because we wanted it in ascending order
17:38
because we wanted it in ascending order and like the intended it is a compound
17:40
and like the intended it is a compound
17:40
and like the intended it is a compound index so awesome we have like optimized
17:42
index so awesome we have like optimized
17:42
index so awesome we have like optimized queries now with the field that we
17:46
queries now with the field that we
17:46
queries now with the field that we needed cool okay so what we're going to
17:49
needed cool okay so what we're going to
17:49
needed cool okay so what we're going to look at next is a full crud and change
17:52
look at next is a full crud and change
17:52
look at next is a full crud and change tracking example so one of the things I
17:55
tracking example so one of the things I
17:55
tracking example so one of the things I mentioned initially was mongod supports
17:57
mentioned initially was mongod supports
17:57
mentioned initially was mongod supports a flexible schema so with the database
18:00
a flexible schema so with the database
18:00
a flexible schema so with the database there may be fields that you have not
18:02
there may be fields that you have not
18:02
there may be fields that you have not defined before um so in this case we are
18:04
defined before um so in this case we are
18:04
defined before um so in this case we are defining a new field on the fly in our
18:06
defining a new field on the fly in our
18:07
defining a new field on the fly in our model class called the book was better
18:09
model class called the book was better
18:09
model class called the book was better and this field does not exist for any uh
18:12
and this field does not exist for any uh
18:12
and this field does not exist for any uh document in the database so we're going
18:15
document in the database so we're going
18:15
document in the database so we're going to create a new movie entity we're going
18:17
to create a new movie entity we're going
18:17
to create a new movie entity we're going to set this field and then we're going
18:18
to set this field and then we're going
18:18
to set this field and then we're going to update few properties and then delete
18:21
to update few properties and then delete
18:21
to update few properties and then delete it and we'll see the whole life cycle
18:23
it and we'll see the whole life cycle
18:23
it and we'll see the whole life cycle with breakpoints so firstly let's create
18:26
with breakpoints so firstly let's create
18:26
with breakpoints so firstly let's create a new movie called mongodb the movie for
18:29
a new movie called mongodb the movie for
18:29
a new movie called mongodb the movie for 2023 we have a plot uh lucky little
18:33
2023 we have a plot uh lucky little
18:33
2023 we have a plot uh lucky little database revolutionizes software
18:34
database revolutionizes software
18:34
database revolutionizes software development it is a documentary um and
18:37
development it is a documentary um and
18:37
development it is a documentary um and we're going to set the book was better
18:38
we're going to set the book was better
18:38
we're going to set the book was better field to true but just to make sure that
18:41
field to true but just to make sure that
18:41
field to true but just to make sure that this actually works we're going to go
18:43
this actually works we're going to go
18:43
this actually works we're going to go back to Compass and we're going to
18:45
back to Compass and we're going to
18:45
back to Compass and we're going to search for this field the book was
18:47
search for this field the book was
18:47
search for this field the book was better and see if there's any document
18:49
better and see if there's any document
18:49
better and see if there's any document that has this field present and once we
18:52
that has this field present and once we
18:52
that has this field present and once we do a fine you'll see that there is no
18:56
do a fine you'll see that there is no
18:56
do a fine you'll see that there is no document with this field so we can
18:57
document with this field so we can
18:57
document with this field so we can confirm that this does not exist in the
19:01
confirm that this does not exist in the
19:01
confirm that this does not exist in the database um and like I said you have to
19:04
database um and like I said you have to
19:04
database um and like I said you have to call Save changes or save changes async
19:06
call Save changes or save changes async
19:06
call Save changes or save changes async so we're going to create a new entity
19:08
so we're going to create a new entity
19:08
so we're going to create a new entity add it to the DB set um save changes
19:11
add it to the DB set um save changes
19:11
add it to the DB set um save changes we're adding breakpoints so we can pause
19:13
we're adding breakpoints so we can pause
19:13
we're adding breakpoints so we can pause and see every step along the way how
19:15
and see every step along the way how
19:15
and see every step along the way how things are working um after we create
19:18
things are working um after we create
19:18
things are working um after we create the new movie entity we're going to
19:19
the new movie entity we're going to
19:19
the new movie entity we're going to update the year to 2024 from 2023 we are
19:23
update the year to 2024 from 2023 we are
19:23
update the year to 2024 from 2023 we are also going to add a genre so we know we
19:27
also going to add a genre so we know we
19:27
also going to add a genre so we know we only had documentary we're going to add
19:28
only had documentary we're going to add
19:28
only had documentary we're going to add true story as well and let's give our
19:30
true story as well and let's give our
19:30
true story as well and let's give our movie some awards cuz why not it
19:32
movie some awards cuz why not it
19:32
movie some awards cuz why not it deserves some awards and nominations um
19:35
deserves some awards and nominations um
19:35
deserves some awards and nominations um we do the save changes async again and
19:37
we do the save changes async again and
19:37
we do the save changes async again and then we finally remove the movie so
19:38
then we finally remove the movie so
19:38
then we finally remove the movie so let's see how this life cycle works we
19:40
let's see how this life cycle works we
19:40
let's see how this life cycle works we have our code ready for change tracking
19:42
have our code ready for change tracking
19:42
have our code ready for change tracking for a basic cred
19:44
for a basic cred operations we run the program and then
19:47
operations we run the program and then
19:47
operations we run the program and then we wait for the break point to
19:58
all right so we're at the first
20:00
all right so we're at the first
20:00
all right so we're at the first breakpoint as you can see um let's like
20:03
breakpoint as you can see um let's like
20:03
breakpoint as you can see um let's like step over it step over the save changes
20:06
step over it step over the save changes
20:06
step over it step over the save changes one thing to note here is if you don't
20:08
one thing to note here is if you don't
20:08
one thing to note here is if you don't call Save changes or save changes Asing
20:10
call Save changes or save changes Asing
20:10
call Save changes or save changes Asing the changes are local standard GF core
20:12
the changes are local standard GF core
20:12
the changes are local standard GF core Behavior so you see the changes
20:14
Behavior so you see the changes
20:14
Behavior so you see the changes reflected in your database only if you
20:16
reflected in your database only if you
20:16
reflected in your database only if you actually call Save
20:18
actually call Save changes now at this point we've paused
20:21
changes now at this point we've paused
20:21
changes now at this point we've paused at you know new movie. here is 2024 so a
20:23
at you know new movie. here is 2024 so a
20:23
at you know new movie. here is 2024 so a new movie should have been added with
20:25
new movie should have been added with
20:25
new movie should have been added with this Fields let's go back to Compass and
20:27
this Fields let's go back to Compass and
20:27
this Fields let's go back to Compass and check that we do a find again with this
20:30
check that we do a find again with this
20:30
check that we do a find again with this field which just added to our movie
20:35
entity awesome okay so we did we did
20:39
entity awesome okay so we did we did
20:39
entity awesome okay so we did we did find our movie that was added so yeah
20:41
find our movie that was added so yeah
20:41
find our movie that was added so yeah congratulations um we can see that there
20:44
congratulations um we can see that there
20:44
congratulations um we can see that there it's a documentary we can see that the
20:46
it's a documentary we can see that the
20:46
it's a documentary we can see that the year is
20:47
year is 2023 um and we can also see that the
20:52
2023 um and we can also see that the
20:52
2023 um and we can also see that the just go back a little
20:53
just go back a little
20:53
just go back a little bit yeah we can see the year we can see
20:56
bit yeah we can see the year we can see
20:57
bit yeah we can see the year we can see that there's no Awards um the book
20:58
that there's no Awards um the book
20:58
that there's no Awards um the book worlds better field is true which is
21:00
worlds better field is true which is
21:00
worlds better field is true which is what we were searching for so now we're
21:02
what we were searching for so now we're
21:02
what we were searching for so now we're going to go to the updates and step over
21:05
going to go to the updates and step over
21:05
going to go to the updates and step over the updates and see if they actually see
21:07
the updates and see if they actually see
21:07
the updates and see if they actually see get reflected in the
21:09
get reflected in the
21:09
get reflected in the database so we update the year add a
21:11
database so we update the year add a
21:11
database so we update the year add a genre add Awards and nominations save
21:14
genre add Awards and nominations save
21:14
genre add Awards and nominations save changes and then go back to Compass to
21:16
changes and then go back to Compass to
21:16
changes and then go back to Compass to see if it got updated so we just do a
21:18
see if it got updated so we just do a
21:18
see if it got updated so we just do a find again and yes um we'll expand on
21:21
find again and yes um we'll expand on
21:21
find again and yes um we'll expand on the genre so now there's two genres
21:24
the genre so now there's two genres
21:24
the genre so now there's two genres instead of one so you can have arrays
21:26
instead of one so you can have arrays
21:26
instead of one so you can have arrays nested objects inside it where on is an
21:29
nested objects inside it where on is an
21:29
nested objects inside it where on is an array and awards is the nested object so
21:32
array and awards is the nested object so
21:32
array and awards is the nested object so we have Awards and nominations yes for
21:34
we have Awards and nominations yes for
21:34
we have Awards and nominations yes for our movie now and the year is also 2024
21:38
our movie now and the year is also 2024
21:38
our movie now and the year is also 2024 um instead of
21:40
um instead of 2023 and
21:42
2023 and lastly let's remove the movie sadly and
21:45
lastly let's remove the movie sadly and
21:46
lastly let's remove the movie sadly and then save changes and then go find it
21:48
then save changes and then go find it
21:48
then save changes and then go find it again in the database and you can't find
21:52
again in the database and you can't find
21:52
again in the database and you can't find it anymore so all of the operations
21:54
it anymore so all of the operations
21:54
it anymore so all of the operations succeeded um we able to see how easy it
21:57
succeeded um we able to see how easy it
21:57
succeeded um we able to see how easy it is to set up the EF code provider how to
22:00
is to set up the EF code provider how to
22:00
is to set up the EF code provider how to perform change tracking and basic card
22:02
perform change tracking and basic card
22:02
perform change tracking and basic card operations with it and also how to use
22:04
operations with it and also how to use
22:04
operations with it and also how to use capabilities from the driver like index
22:06
capabilities from the driver like index
22:06
capabilities from the driver like index management by creating a new index and
22:08
management by creating a new index and
22:08
management by creating a new index and you can do much more um with that so the
22:12
you can do much more um with that so the
22:12
you can do much more um with that so the main thing to notice here is the only
22:15
main thing to notice here is the only
22:15
main thing to notice here is the only thing that's different if you're already
22:16
thing that's different if you're already
22:17
thing that's different if you're already familiar with ef core is the use mongodb
22:19
familiar with ef core is the use mongodb
22:19
familiar with ef core is the use mongodb function so we use the already um
22:23
function so we use the already um
22:23
function so we use the already um defined database client and the database
22:25
defined database client and the database
22:25
defined database client and the database name and that's all that you need to
22:27
name and that's all that you need to
22:28
name and that's all that you need to remember if if you've already been
22:29
remember if if you've already been
22:29
remember if if you've already been familiar with the
22:31
familiar with the FC I also want to showcase like some of
22:34
FC I also want to showcase like some of
22:34
FC I also want to showcase like some of the key features that are available
22:35
the key features that are available
22:35
the key features that are available already since we've been GA in May this
22:38
already since we've been GA in May this
22:38
already since we've been GA in May this year and then also what's coming up so
22:39
year and then also what's coming up so
22:40
year and then also what's coming up so we are compatible with uh EF core 8 and
22:43
we are compatible with uh EF core 8 and
22:43
we are compatible with uh EF core 8 and net 8 um we already saw capabilities and
22:46
net 8 um we already saw capabilities and
22:46
net 8 um we already saw capabilities and action which with crud operations change
22:48
action which with crud operations change
22:48
action which with crud operations change tracking um embedded documents link
22:51
tracking um embedded documents link
22:51
tracking um embedded documents link query support
22:53
query support Etc um in terms of the upcoming features
22:56
Etc um in terms of the upcoming features
22:56
Etc um in terms of the upcoming features what I'm excited about is transaction in
22:58
what I'm excited about is transaction in
22:58
what I'm excited about is transaction in optimistic concurrency which is coming
23:00
optimistic concurrency which is coming
23:01
optimistic concurrency which is coming soon this week actually as we're
23:02
soon this week actually as we're
23:02
soon this week actually as we're speaking um so what this allows is it
23:05
speaking um so what this allows is it
23:05
speaking um so what this allows is it makes save changes and save changes
23:07
makes save changes and save changes
23:07
makes save changes and save changes Asing transactional by default if you
23:10
Asing transactional by default if you
23:10
Asing transactional by default if you want to turn it off you can uh
23:12
want to turn it off you can uh
23:12
want to turn it off you can uh intentionally and we support two modes
23:14
intentionally and we support two modes
23:14
intentionally and we support two modes of optimistic concurrency so you can
23:16
of optimistic concurrency so you can
23:17
of optimistic concurrency so you can define a concurrency token like a last
23:19
define a concurrency token like a last
23:19
define a concurrency token like a last updated time field and the onus is on
23:22
updated time field and the onus is on
23:22
updated time field and the onus is on the developer to update that but you can
23:25
the developer to update that but you can
23:25
the developer to update that but you can also use a row version which is an
23:26
also use a row version which is an
23:26
also use a row version which is an automatic update field where EF core
23:29
automatic update field where EF core
23:29
automatic update field where EF core provider will take care of it on its own
23:32
provider will take care of it on its own
23:32
provider will take care of it on its own um there's other features also listed
23:34
um there's other features also listed
23:34
um there's other features also listed here but um we have our whole list
23:37
here but um we have our whole list
23:37
here but um we have our whole list available on GitHub I can share a link
23:40
available on GitHub I can share a link
23:40
available on GitHub I can share a link later um and that's pretty much in in
23:44
later um and that's pretty much in in
23:44
later um and that's pretty much in in terms of what's going to be available
23:46
terms of what's going to be available
23:46
terms of what's going to be available what I do want to mention next is what
23:49
what I do want to mention next is what
23:49
what I do want to mention next is what else are we working on so we spoke about
23:51
else are we working on so we spoke about
23:51
else are we working on so we spoke about the EFC provider we spoke about the
23:54
the EFC provider we spoke about the
23:54
the EFC provider we spoke about the driver um and how these tie together and
23:57
driver um and how these tie together and
23:57
driver um and how these tie together and how you can use Monga B Atlas along with
23:59
how you can use Monga B Atlas along with
23:59
how you can use Monga B Atlas along with it but four things I want to highlight
24:01
it but four things I want to highlight
24:01
it but four things I want to highlight that our team has been working on and is
24:03
that our team has been working on and is
24:03
that our team has been working on and is very excited to share updates on um
24:06
very excited to share updates on um
24:06
very excited to share updates on um firstly on the top left you'll see the
24:07
firstly on the top left you'll see the
24:07
firstly on the top left you'll see the mongod tv.net analyzer so for folks who
24:11
mongod tv.net analyzer so for folks who
24:11
mongod tv.net analyzer so for folks who are not familiar with this it is an
24:13
are not familiar with this it is an
24:13
are not familiar with this it is an extension already available as a Ned
24:15
extension already available as a Ned
24:15
extension already available as a Ned package and it's a Roslin analyzer which
24:18
package and it's a Roslin analyzer which
24:18
package and it's a Roslin analyzer which allows you to see your queries at
24:19
allows you to see your queries at
24:19
allows you to see your queries at compile time in your IDE so if you
24:22
compile time in your IDE so if you
24:22
compile time in your IDE so if you working with Builders or link you can
24:25
working with Builders or link you can
24:25
working with Builders or link you can use the analyzer to hover over your code
24:28
use the analyzer to hover over your code
24:28
use the analyzer to hover over your code with the mouse and you'll see a three
24:29
with the mouse and you'll see a three
24:29
with the mouse and you'll see a three dots and then you can expand on that to
24:31
dots and then you can expand on that to
24:31
dots and then you can expand on that to see your queries even before they are
24:33
see your queries even before they are
24:33
see your queries even before they are sent to the server so it's pretty cool
24:36
sent to the server so it's pretty cool
24:36
sent to the server so it's pretty cool in terms of seeing what queries would be
24:38
in terms of seeing what queries would be
24:38
in terms of seeing what queries would be executed as you're working and
24:40
executed as you're working and
24:40
executed as you're working and developing your
24:41
developing your application um another important thing
24:44
application um another important thing
24:44
application um another important thing here is as of yesterday we shipped an
24:46
here is as of yesterday we shipped an
24:47
here is as of yesterday we shipped an update to the net analyzer and it
24:48
update to the net analyzer and it
24:48
update to the net analyzer and it supports EF core as well so if you're
24:51
supports EF core as well so if you're
24:51
supports EF core as well so if you're using the driver or EF core um you can
24:54
using the driver or EF core um you can
24:54
using the driver or EF core um you can use the anal analyzer along with it the
24:57
use the anal analyzer along with it the
24:57
use the anal analyzer along with it the next one below that
24:59
next one below that is better o data support So o data is an
25:02
is better o data support So o data is an
25:02
is better o data support So o data is an extension that has been available um in
25:04
extension that has been available um in
25:04
extension that has been available um in the net ecosystem for a while so if you
25:06
the net ecosystem for a while so if you
25:06
the net ecosystem for a while so if you are working with OA we do have an
25:08
are working with OA we do have an
25:08
are working with OA we do have an extension for mongodb available you can
25:11
extension for mongodb available you can
25:11
extension for mongodb available you can simply use the enable query tag on
25:13
simply use the enable query tag on
25:13
simply use the enable query tag on your code on your controller's queries
25:16
your code on your controller's queries
25:16
your code on your controller's queries and then it will just make your queries
25:18
and then it will just make your queries
25:18
and then it will just make your queries powered by OD data um we've been working
25:20
powered by OD data um we've been working
25:20
powered by OD data um we've been working on improving the O dat extension by
25:23
on improving the O dat extension by
25:23
on improving the O dat extension by adding support for better filters and
25:25
adding support for better filters and
25:25
adding support for better filters and compute operations and in the next
25:27
compute operations and in the next
25:27
compute operations and in the next iteration of the next release of the
25:29
iteration of the next release of the
25:29
iteration of the next release of the extension all of this will be
25:31
extension all of this will be
25:31
extension all of this will be available the next one that I think a
25:33
available the next one that I think a
25:33
available the next one that I think a lot of folks will be intrigued about is
25:35
lot of folks will be intrigued about is
25:35
lot of folks will be intrigued about is our semantic kernel integration so if
25:38
our semantic kernel integration so if
25:38
our semantic kernel integration so if you are interested in building genni
25:40
you are interested in building genni
25:40
you are interested in building genni applications then you have the mongodb
25:44
applications then you have the mongodb
25:44
applications then you have the mongodb memory connector um which allows you to
25:46
memory connector um which allows you to
25:46
memory connector um which allows you to store your vector embeddings alongside
25:48
store your vector embeddings alongside
25:48
store your vector embeddings alongside your data so you can use Atlas to store
25:52
your data so you can use Atlas to store
25:52
your data so you can use Atlas to store all the data you already have with the
25:54
all the data you already have with the
25:54
all the data you already have with the vector embeddings and the semantical
25:56
vector embeddings and the semantical
25:56
vector embeddings and the semantical integration will allow you to um query
25:59
integration will allow you to um query
25:59
integration will allow you to um query your data and create gen applications
26:01
your data and create gen applications
26:01
your data and create gen applications with that so um I'll just share a couple
26:04
with that so um I'll just share a couple
26:04
with that so um I'll just share a couple of links uh in the
26:06
of links uh in the chat and in case anyone's interested um
26:10
chat and in case anyone's interested um
26:11
chat and in case anyone's interested um I was able to get up and running with
26:12
I was able to get up and running with
26:12
I was able to get up and running with adding basic documents and create a
26:14
adding basic documents and create a
26:14
adding basic documents and create a chatbot in less than an hour so it's
26:16
chatbot in less than an hour so it's
26:16
chatbot in less than an hour so it's very uh very nice um the last thing I
26:19
very uh very nice um the last thing I
26:19
very uh very nice um the last thing I want to mention is the C driver 3.0 so
26:22
want to mention is the C driver 3.0 so
26:22
want to mention is the C driver 3.0 so our cop driver has not seen a major
26:25
our cop driver has not seen a major
26:25
our cop driver has not seen a major upgrade in the last eight years so this
26:27
upgrade in the last eight years so this
26:27
upgrade in the last eight years so this is really the nextg version of our
26:29
is really the nextg version of our
26:29
is really the nextg version of our driver which allows you to reduce a lot
26:31
driver which allows you to reduce a lot
26:31
driver which allows you to reduce a lot of tech dep deprecate things add new
26:33
of tech dep deprecate things add new
26:33
of tech dep deprecate things add new capabilities that we've been wanting to
26:35
capabilities that we've been wanting to
26:35
capabilities that we've been wanting to add for years um so we're really excited
26:37
add for years um so we're really excited
26:37
add for years um so we're really excited to introduce that the uh estimated time
26:41
to introduce that the uh estimated time
26:41
to introduce that the uh estimated time for that is late September to early
26:43
for that is late September to early
26:43
for that is late September to early October so we should be uh able to share
26:45
October so we should be uh able to share
26:46
October so we should be uh able to share more details as we make progress on
26:49
more details as we make progress on
26:49
more details as we make progress on that okay um I think that's all from me
26:53
that okay um I think that's all from me
26:53
that okay um I think that's all from me I'm open to questions but before we go
26:55
I'm open to questions but before we go
26:55
I'm open to questions but before we go to any questions um I also want to leave
26:57
to any questions um I also want to leave
26:57
to any questions um I also want to leave this up which is um codes or links
27:00
this up which is um codes or links
27:00
this up which is um codes or links available to view the documentation for
27:03
available to view the documentation for
27:03
available to view the documentation for efcore if you want to see the GitHub
27:05
efcore if you want to see the GitHub
27:05
efcore if you want to see the GitHub repository for the features that I just
27:07
repository for the features that I just
27:07
repository for the features that I just mentioned in terms of what's available
27:09
mentioned in terms of what's available
27:09
mentioned in terms of what's available what are the limitations what is not
27:11
what are the limitations what is not
27:11
what are the limitations what is not supported but we're considering um and
27:13
supported but we're considering um and
27:13
supported but we're considering um and then if you want to engage with the
27:15
then if you want to engage with the
27:15
then if you want to engage with the community we have our community forums
27:17
community we have our community forums
27:17
community we have our community forums and lastly our J board is public for any
27:20
and lastly our J board is public for any
27:20
and lastly our J board is public for any project so for the efco provider
27:22
project so for the efco provider
27:22
project so for the efco provider specifically if you've already used it
27:24
specifically if you've already used it
27:24
specifically if you've already used it and want to share any feedback feel free
27:26
and want to share any feedback feel free
27:26
and want to share any feedback feel free to do that um thank you and back to you
27:29
to do that um thank you and back to you
27:29
to do that um thank you and back to you Simon