Muutke küpsiste eelistusi

E-raamat: Beginning Entity Framework Core 5: From Novice to Professional

  • Formaat: PDF+DRM
  • Ilmumisaeg: 16-Mar-2021
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484268827
Teised raamatud teemal:
  • Formaat - PDF+DRM
  • Hind: 67,91 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 16-Mar-2021
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484268827
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

Use the code-driven approach of Entity Framework Core 5 to build a functional web application that accesses a database on the backend server. This book covers the common use cases of Entity Framework that a developer needs to master in order to begin building applications that run against a database. Throughout the book you will be shown how to use Entity Framework Core 5 by implementing a simple ASP.NET Core Razor Pages line-of-business application. This example application will be similar to those you might write yourself and deploy to your users on a web or intranet site via a browser. 

This book takes a code-first approach in which your database will be created and seeded programmatically. You won’t need to create the database through your database engine’s interface. Instead, you will be shown how to define your data model in Entity Framework, and then let Entity Framework do the work of creating your database and schema for you. From there you will learn how to seed your database with example data, then to implement the common, so-called CRUD operations consisting of creating, retrieving, updating, and deleting rows of data. By the end of the book you will have built a well-designed application that you can use as the basis for future applications that you create in your job. 


What You Will Learn
  • Download and install Entity Framework Core 5
  • Perform create, read, update, and delete (CRUD) operations
  • Create and seed a database with example data using Entity Framework Core 5
  • Incrementally add new database functionality through Entity Framework Core 5 migrations
  • Recognize when to take advantage of new features introduced in Entity Framework Core 5
  • Deliver line-of-business applications using ASP.NET Core that run in a browser

Who This Books Is For

Developers who are familiar with C# and the .NET Framework who want to learn database access using Entity Framework Core 5. For developers creating web-based, line-of-business applications who want to create those applications more quickly and efficiently when databases are involved. 
About the Author xi
About the Technical Reviewer xiii
Introduction xv
Part I: Getting Started 1(22)
Chapter 1 Installation
3(12)
Install Visual Studio
3(2)
Create a Project
5(4)
Install Entity Framework
9(3)
Install the Core Tools Package
12(1)
SQL Server Database
13(1)
Summary
14(1)
Chapter 2 Project Structure
15(8)
Core Project
15(3)
Unit Testing Overview
18(1)
Data Access Layer Project
19(1)
Main Project References
20(1)
Summary
20(3)
Part II: Core Features 23(108)
Chapter 3 Entities
25(12)
Person Entity
25 (1)
Address Entity
26(1)
Simple Navigation Property
26(1)
Entity Property Constraints
27(2)
Entity Schema Attributes
29(2)
More Entity Schema Attributes
31(1)
Mapping of the Primary Key Column
31(1)
Enum Mapping
32(1)
Entity Inheritance Mapping
33(1)
Table-per-Hierarchy
33(1)
Table-per-Type
34(2)
Summary
36(1)
Chapter 4 Database Context
37(8)
Creating a Simple Database Context
37(1)
Connecting to Our Database
37(2)
Accessing Entities in a Database Context
39(1)
Saving Entity Changes
40(1)
Configuring a Database Context
40(3)
Set a Database Schema for All Entities
40(1)
Composite Key Constraint
41(1)
Primary Key Constraint
41(1)
Default Property Value
42(1)
Foreign Key Relationships
43(1)
Summary
43(2)
Chapter 5 Creating a Database from Code
45(12)
Setting the Connection String
45(3)
Creating the Initial Migration
48(5)
Creating the Database from the Migration
53(1)
Connect to the New Database from Visual Studio
54(2)
Summary
56(1)
Chapter 6 Seeding Data
57(8)
Populating Lookup Data
57(6)
Seeding Test Persons
63(1)
Seeding Addresses
64(1)
Summary
64(1)
Chapter 7 Getting Data
65(12)
LINQ Queries
65(4)
Select Anonymous Types
66(1)
Select Object Transformation
66(1)
Joins in LINQ
67(1)
Select the Navigation Property
68(1)
Sorting Data
68(1)
Method Syntax Queries
69(1)
Testing Our Data
70(5)
Summary
75(2)
Chapter 8 Inserting Data
77(10)
Inserting the Root Entity
77(1)
Inserting Child Records
78(2)
Primary Key Values
80(1)
Identity Seeded Primary Key
80(1)
Guid Primary Key
80(1)
Non-computed Primary Key
80(1)
Foreign Key Values
80(1)
Default Values
81(1)
Record Insertion Integration Tests
81(4)
Summary
85(2)
Chapter 9 Updating Data
87(10)
Updating the Root Entity
87(1)
Updating a Child Entity
88(1)
Integration Test
89(6)
Summary
95(2)
Chapter 10 Deleting Data
97(8)
Deleting the Root Entity
97(1)
Deleting a Child Entity
97(4)
Cascade Delete
98(1)
Client Set Null Delete Behavior
99(1)
Restrict Delete Behavior
100(1)
Set Null Delete Behavior
101(1)
Integration Test
101(3)
Summary
104(1)
Chapter 11 Navigation Properties
105(26)
Mapping a Parent Entity in a One-to-Many Relationship
105(1)
Mapping a Related Entity to Parent
106(1)
One-to-Many Integration Test
107(3)
Many-to-Many Relationships
110(20)
Map a Relationship Through Navigation Properties
110(1)
Create and Run Migration
111(3)
Many-to-Many Integration Test
114(16)
Summary
130(1)
Part III: Advanced Features 131(32)
Chapter 12 Aggregations
133(12)
Unit Test Setup
133(1)
Count
134(1)
Adding Age to Person
135(2)
Min
137(1)
Max
137(1)
Average
138(1)
Average Unit Test
138(1)
Sum
138(1)
Group By
139(4)
Direct Group By
139(1)
Group By with Count
140(1)
Group By with Min
140(1)
Group By with Max
141(1)
Group By with Average
142(1)
Group By with Sum
142(1)
Summary
143(2)
Chapter 13 Stored Procedures
145(8)
Add Stored Procedures to a Database
145(4)
Set Up Unit Tests
149(1)
Test the GetPersonsByState Stored Procedure
150(1)
Test the AddLookUpltem Stored Procedure
151(1)
Summary
152(1)
Chapter 14 Migrations
153(10)
What Is a Migration?
153(1)
How to Add a Migration?
153(1)
The Migration API
154(1)
Common Schema Commands
154(1)
Add a Column to a Table
154(1)
Change a Column in a Table
155(1)
Common Data Commands
155(3)
Inserting Data
155(1)
Deleting Data
156(1)
Update Data in a Migration
157(1)
How to Run Migrations
158(1)
Update to the Most Recent Migration
159(1)
Migrate to a Specific Migration
159(1)
Run Migration from Code
159(1)
Automatic Data Migrations
159(2)
Summary
161(2)
Part IV: A Model Web Application 163(144)
Chapter 15 Authentication on the Web
165(16)
Install Identity NuGet Packages
165(1)
Initialize Identity on App Startup
166(6)
Scaffold UI
172(2)
Update Database
174(1)
Updating UI
175(5)
Summary
180(1)
Chapter 16 Displaying Data on the Web
181(24)
Scaffolding UI
181(2)
Generated List View and Model
183(4)
Generated Details View and Model
187(3)
Adding Addresses to the Details View
190(4)
Adding Contacts to Navigation
194(3)
Testing the App
197(2)
Adding Some Polish
199(4)
Summary
203(2)
Chapter 17 Inserting Data on the Web
205(28)
Generated Create Razor Page
205(5)
Generated View
205(2)
Generated Model
207(2)
Person Model Validation
209(1)
Adding Addresses
210(13)
Address Model Validation
210(4)
Updating UI
214(5)
Update the Razor Page Model
219(2)
Running the App
221(2)
Adding Some Polish
223(8)
Update the Model
223(3)
Update the UI
226(5)
Summary
231(2)
Chapter 18 Updating Data on the Web
233(16)
Generated Edit Razor Page View
233(2)
Generated Edit Razor Model
235(3)
Add a Friendly Address Update
238(10)
Update the Model
238(4)
Update the Ul
242(5)
Running the App
247(1)
Summary
248(1)
Chapter 19 Deleting Data on the Web
249(16)
Generated Delete Razor Page View
249(2)
Generated Model
251(2)
Updating Page Controller Code to Delete Addresses
253(2)
Running the App
255(1)
Showing a Person's Address on the Delete Form
256(7)
Update the Page Controller
256(1)
Update the UI
257(6)
Summary
263(2)
Chapter 20 Reporting on the Web
265(16)
Creating the Razor Page
265(1)
Updating the Razor Model
266(1)
Updating the Razor View
267(2)
Add a Link to Navigation
269(3)
Running the Report
272(1)
Adding Pagination
272(7)
Adding Sample Data
272(3)
Adding Pagination Support
275(2)
Updating the Model for Pagination
277(1)
Add Pagination to the Razor View
278(1)
Running the Finished Report
279(1)
Summary
279(2)
Chapter 21 Authorization on the Web
281(26)
Enable Roles
281(1)
Add Test Users
281(1)
Add and Assign Roles on Startup
282(2)
Enforce Authorization
284(21)
Authorize the Contacts Menu Item
285(2)
Secure Razor Pages
287(18)
Summary
305(2)
Part V: Learning More 307(6)
Chapter 22 Delving Deeper
309(2)
Chapter 23 Conclusion
311(2)
Index 313
Eric Vogel is a seasoned contributor to Visual Studio Magazine and Senior Software Developer at Red Cedar Solutions Group. He has been developing .NET framework web and desktop solutions for 13 years. He holds a bachelor of science degree in computer science from Michigan State University. He is Acting President of the Greater Lansing User Group for .NET.