ADO.NET Entity Framework | ADO.NET Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome to nourish technologies this is Sudha Sharma in today's session we are going to discuss about what is a do dotnet entity framework already the people who are aware of a do dotnet in dotnet framework this is one of the important concept to know about what is a do dotnet entity framework as it is very much trending these days everywhere people are looking for entity framework all advanced technologies are using area dotnet entity framework in Microsoft so that is the reason why we should know what exactly entity framework is in the complete session of entity framework we will see the practical approach of communicating with the database by using ad or dotnet entity framework but first we will have a overview of what exactly ad or dotnet entity framework is the basic architecture of a do dotnet entity framework in order to go into the concept of a do dotnet entity framework first I have to give a basic outline of your general data accessing frameworks in dotnet as already you know that in order to establish communication and handle communication between application and database we have a framework introduced by Microsoft earlier we used a do after that on dotnet framework we use radio dotnet and from the dotnet framework version 3.5 they introduced it a do dotnet entity framework so what exactly a do dotnet entity framework is and what are the key features of a do dotnet entity framework let us have an outline on that entity framework is actually an ORM ORM means object relational mapper what is the concept of ORM is earlier in your ad or it generally dotnet developers need to write everything for database in order to interact with the database they need to query with the database now o RM is a concept it is an object relational mapper where dotnet developers will write for the business requirements that means entity framework is an object relational mapper where dotnet developers can interact with the database by communicating with the help of business specific logic that means developers will no longer write for database they will write for the business requirements one of the main advantage of that is no longer developers need to be having a database in order to build the application they will design everything for the business requirement and when database is ready this application will interact with the database so what exactly entity framework is entity framework is an object relational mapper that enables dotnet developers to work with the relational data by using domain-specific classes we call these domain-specific objects as poco plain old CLR objects it eliminates the need of most of the data access code that usually developers need to write so one of the key advantages of this so when we talk about Adia dotnet entity framework what is the major advantage of a do dotnet entity framework the implementation of ORM with the entity framework provides several services like lazy loading change tracking identity resolution and query translation some of the key features of a do dotnet entity framework our change tracking identity resolution lazy loading and query translations I will give you just a basic example of what is lazy loading later in other sessions when we are continuing with entity framework we will discuss about other features in general real world requirement if you got a requirement where you have millions of records in the database due to those millions of Records you need to access all those millions of Records and show in a UI you may be using your grid view to display the data when you are displaying the data by using a grid view you have to pull all the million records and show in the grid you in multiple pages generally what happens is we try to access all the million records and put them in 200 pages instead of that we can implement lazy loading lazy loading is a concept where object is initialized only when it is required that means when you are watching the first page it will get only the first page records and show in the grid view when user switches to the second page then only the second page will be loaded that means the next set of records are pulled from the database so unnecessarily all the records are not pulled from the database and loaded into your grid view they are loaded only when you are switching to the next pages this improves the performance of application generally in AD or dotnet we need to implement this as a special option when we are working with databases but a do dotnet entity framework provides as a built-in feature for lazy loading so some key features of video dotnet entity framework are lazy loading change tracking query translation and object materialization so one of the main advantage of that is loppers can focus on their application-specific business logic that means earlier developers need to focus on database logic now developers need not to focus on database logic they will focus on application specific business logic rather than the database fundamentals the key advantage is they need not to be database ready in order to build an application we build application and whenever database ready it can interact with the database that is what the key concept of ad or dotnet entity framework ad or dotnet entity framework has a full provider model it provides communication not only with SQL server but also databases like Oracle MySQL and db2 that means you can use ad or dotnet entity framework not only with SQL Server you can use it with Oracle or MySQL or db2 also so it has a full provider model that can communicate with various databases and one of the great feature of ad or dotnet entity framework is entity framework introduces multiple modeling techniques what are these multiple modeling techniques it introduces the modeling techniques like we have the code first we have the model first and data base first so entity framework has full provider model to communicate with various databases and entity framework introduces multiple modeling techniques like code first model first or database first what are these modeling techniques let us take a look about these three so when you look at the modeling techniques suppose you are building application for real time when you are building application think if database is not ready for your application and you need to build the application in that situation so when we start and we design our domain-specific classes we are designing our domains specific classes because there is no database ready yet that means we are no longer writing for database we are writing for the business requirement for the business requirement you design your classes and these classes will be responsible for mapping with the database tables that means for your classes whenever database is ready it can communicate with it that means database is not ready fast the business logic is ready you return the logic to interact with the database you return the classes that are representing your business and those classes will create the database this type of approach is called as code first in code first approach we will first design the classes and these classes will map to database tables so whenever database tables are ready then these classes will be responsible for interacting with them this type of approach is code first approach if you do not have domain classes and you have database means in our in your project database is ready if database is ready then we need some classes to interact with the database now entity framework provides a database first approach in database first approach the classes are generated for you according to the database and tables earlier in code first what happened you designed the classes for which database and tables were are created or mapped but in the next scenario you can see that database is already there and for the existing database the domain-specific classes are created so that you can start communicating with the database now in the third situation if you don't have the domain-specific classes and you don't have the database ready then what you can do is you can use a visual designer through visual designer you can design the entity model and when you design the entity model for your model automatically it will generate the classes as well as database that means we do not have domain classes and we do not have the database we are doing everything through a visual designer and that visual designer is responsible for generating the classes as well as the database so three types of modeling approaches database programming approaches are there in entity framework we have a code first approach database first approach and model first approach so what is exactly the database first approach in database approach you already have database end tables entity framework will generate the classes for that so that you can start communicating with the database by using the classes what happens in code first approach you design the database related classes through a business requirement specification and entity framework will generate the database and tables or it will interact with the database in tables when they are ready here code is first and in the previous situation database first and the third situation is the model first approach in model first approach we will design the visual designer the visual designer comprises of all the relationships in a diagrammatic form and the to this visual designer entity framework will generate the classes as well as the database tables we call this type of approach as model first approach so entity framework has three different modeling techniques we have code first we have database first and model first practically we will see them how to use these three types of approaches in our later sessions but what exactly entity framework comprises of let us take a look that means whenever we are working with our traditional ad or dotnet you know that the basic idea dotnet architecture comprises of connection command data reader data adapter data set and data view but in a do dotnet entity framework architecture what are the major components of entity framework architecture see entity framework area dotnet entity framework comprises of EDM we call this as entity data model idiom comprises of three main components the conceptual model storage model and mapping conceptual model actually represents the data we are working with so in entity data model there will be a conceptual model that represents the data we are working with and storage model contains the data that means the data is stored in the storage model and it is represented through the conceptual model and mapping contains information that specifies how a conceptual model will communicate with the storage model so in entity data model the conceptual model needs to communicate with the storage model and that is done by using mapping mapping contains information that specify how a conceptual model communicates with the storage model so entity data model has three important components conceptual model mapping and storage model conceptual model represents the data storage model contains the data and mapping contains information that specifies how a conceptual model will communicate with storage model and in entity framework we do not use SQL queries anymore entity framework uses link you to entity and entity SQL queries link you to entity entity SQL or query approaches used in entity framework but these queries are not understandable to database so we have to translate the link you queries into the database native queries remember one point in entity framework we are not writing anything for database that means we are going to eliminate most of the data access code we need you to write earlier so that means here everything is queried by using link you so entity framework uses link you to entity and entity SQL as query approaches to communicate with database but these query approaches are not understandable to the database that means the link you queries must be translated into database native queries that is done by entity client data provider so what is the role of entity client data provider in entity framework it will translate the link you queries into the database native queries entity framework will use all linked you queries they are translated into database native queries by entity client data provider and object services is the main entry point for entity framework it is responsible for reading the data from the data source and written it back so what is object services in entity framework it is the main entry point of entity framework it is responsible for reading the data from the data source and written it back so entity framework comprises of an ad or dotnet data provider and we know the providers generally we have SQL provider ad ODBC provider oledb provider these will provide all the classes to communicate with the database so entity framework architecture comprises of EDM with conceptual model storage model mapping conceptual model represents the data storage model contains the data mapping contains information that specify how conceptual model communicates with storage model in entity framework the queries are linked you to entity entity SQL these queries are translated into database native queries by using entity client data provider and object services is the main entry point of entity framework which is responsible for reading the data from data source and written it back over all communication in entity framework with the database is handled by using dotnet data providers this is the basic architecture of a do dotnet entity framework now we will see practical approach and what are the libraries required to deal with entity framework that we will continue in our later sessions of entity framework thank you and keep watching nourish AI technologies YouTube channel and subscribe for more thang
Info
Channel: Naresh i Technologies
Views: 40,424
Rating: undefined out of 5
Keywords: ADO.NET, ADO.NET Entity Framework, Sudhakar Sharma, Naresh IT, Hands on ADO.NET Training, ADO.NET Demo, Online ADO.NET Training, ADO.NET Tutorial Videos, ADO.NET Overview, ADO.NET Interview Questions
Id: kkQF6lBcFTg
Channel Id: undefined
Length: 18min 38sec (1118 seconds)
Published: Mon Sep 12 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.