ASP.Net MVC 5 Application Development Using Entity Framework 6 and VS 2015
Prev Book Contents » Next Book Contents » Price »
Detailed Comparision with SAP Business One »»
Special Offer, Learner Pack = 8 Books + Software
Free, 6 Books + Software
Pay only for 2
Table of Contents
The objective of this book is to teach how to integrate Entity Framework into and build an ASP.Net MVC Application.
Chapter 1: Introduction to Entity Framework 6
- Where does Entity Framework fit in a n-tier application?
- Why should we consider moving from ADO.Net to Entity framework as the data access technology for our applications?
- What is O/RM? How does O/RM handle mismatch?
- Benefits of using EF
- Roles of ORMS
- Create an Entity Data Model for Sales Order Management System
- What is an ER diagram?
- Degree of a relationship
- Cardinality of a relationship
- Components of Entity Data Model
- Create an EDM for Sales Order Management System using Visual Studio 2015 and Entity Framework 6
- Entity Framework Development Approaches
- Database First
- Model First
- Code First
- Building blocks of generated EDM (SOMModel.edmx)
- EF Context and Entity Classes - SOMModel.Context.tt and SOMModel.tt
- SOMModel.tt
- POCO Class (Plain Old CLR Object)
- EDM Designer
- Exploring conceptual model of the EDM using Model Browser
- EntitySet element
- EntityType element
- key element
- Property element
- Associations
- Navigation properties
- Mappings Section
- Context Class
- Responsibilities of DbContext
- Instantiating DbContext
- DBSet Class and its Methods
- Querying with EDM
- Query the Entity Data Model using LINQ to Entities
- Filtering data
- Retrieving a Single entity
- How to load related entities
- Lazy Loading
- Eager loading using Include() method in Entity Framework
- Explicit Loading
- Projections in LINQ to Entities queries
- Grouping
- Grouping by Multiple Properties
- Sorting
- Inserting new Entities into the database
- Modifying Entities
- Deleting Entities
- Saving objects graph
- What is entity state and role of entity state while persisting data into the database
Chapter : 2. Develop ASP.Net Application Using Entity Framework 6
- Data Source Controls in ASP.Net
- SqlDataSource Control
- LinqDataSource Control
- ObjectDataSource Control
- EntityDataSource Control
- EntityDataSource control vs ObjectDataSource control
- EntityDataSource Web Server Control
- Maintaining the life cycle of the ObjectContext with the EntityDataSource control
- Develop ASP.Net Application Using the EntityDataSource control
- Create an ASP.Net web application
- Create an Entity Data Model as a separate Class Library Project
- Using EntityDataSource control for EntityFramework 6
- Install the package Microsoft.AspNet.EntityDataSource
- Create a new Web Form page
- Add and configure the EntityDataSource control on a web form
- Configure properties of the EntityDataSource Control
- ContextTypeName property
- EntitySetName property
- How to Bind Web Controls to an EntityDataSource control
- Ex 1: How to bind a Drop-Down List to an EntityDataSource control and display data
- Ex 2: How to filter data using Where property of EntityDataSource control
- Ex 3: Pass parameter values to the Where property using a Control Parameter
- Ex 4: Display, update and delete related entities data using EntityDataSource control Include property in a GridView Control
- Ex 5: Binding DropDownList to an EntityDataSource in EditItemTemplate of a GridView
- Ex 6 : Displaying and updating related entities using multiple EntityDataSource controls - (Master - Detail page)
- Ex 7: How to display and insert an entity in a Master/Detail form using GridView and ListView controls
- How to build Three-Tier ASP.Net application using EntityFramework 6 and ObjectDataSouce control
- Properties of ObjectDatasource control
- Create a Class Library project for the Business layer in the solution
- Create a business-class and implement methods in the class to perform CRUD operations
- Passing objects as parameters to the methods
- Displaying Data With the ObjectDataSource control using Entity Framework 6
- Add and configure Object Data Source and GridView
- ObjectDatasource control Properties
- SelectMethod
- DeleteMethod
- UpdateMethod
- Binding a GridView to the ObjectDataSource
- Deleting data with GridView Control
- Editing Data with the GridView
- InsertMethod Property of ObjectDataSource
- Display, Update and Delete Entities data using ObjectDataSource control in a DetailsView
- Handling Concurrency with the Entity Framework in an ASP.NET Web Application
- Implement optimistic Concurrency Conflicts with the EF
- Handling Optimistic Concurrency Exceptions
- Managing Transactions in the EntityFramework
Chapter 3 : Building Sales Order Management Application using MVC 5 & EF 6 using DataBase First Approach
- Introduction to ASP.NET MVC Architecture
- Page Controller Pattern vs MVC design Pattern in ASP.Net
- Advantages of an MVC-Based Web Application
- Building blocks of MVC application
- Creating an ASP.Net MVC 5 application in VS 2015
- How ASP.NET MVC Framework maps browser requests to Controller actions
- How to apply Routing Constraints in ASP.NET MVC?
- Creating a controller in MVC 5
- Action methods
- Controllers View method in ASP.Net MVC application
- Default Action method
- Action Results
- Receiving Data From Request to Controller
- Getting data from Context Objects
- Action method parameters
- Model Binding
- Creating Views in MVC 5
- Create a Index view of Customer
- Passing data from Controller to View in ASP.Net MVC application
- Using ViewData object in MVC application
- TempData object
- Using ViewBag object in MVC application
- Using ViewModels
- Domain class vs ViewModel class
- Access a View Model object
- CRUD operations with Entity Framework 6 Database First using MVC 5
- Set up the database
- Create a Model using EF
- Add new Scaffold item to create controller and views
- What is Scaffolding ?
- What are the Advantages of using Scaffolding ?
- How to connect Customer Views from the Home page of the Application
- Explore and understand the code generated for the CRUD operations
- How to refer Model object in the Razor View
- Strongly typed Model object
- Exploring the Details Method
- Exploring the Delete Method
- Exploring the Edit Action method
- Html.BeginForm and Html.EditorFor Html Helper Methods
- Model Binding
- Binding to Simple Types
- Model binding Complex objects
- Bind Attribute
- Understanding ModelState and integration with HTML Helper Methods
- Exploring the Create method
- Repository Pattern
- Create Repository
- Show List of Products
- Implementing the Index View Template
- Show Details of Product
- Implementing the Details View Template
- Update Product Details
- Delete Product
- Razor Syntax
- Customizing a View
Chapter 4: Creating ASP.Net MVC 5 Application with Entity Framework 6 Code First
- Create the Data Model
- Create the EntityFramework Context
- Set up EF to initialize the database
- Set up EF to use a SQL Server Express LocalDB database
- Configuring Connections
- Creating a Product Controller and Views
- View the Database