CodeFirstDevelopmentwithEntityFramework.pdf 英文原版

所需积分/C币:10 2019-08-21 03:58:01 1.42MB .PDF
收藏 收藏

Code-First Development with Entity Framework
Code-First Development with Entity Framework Copyright o 2015 Packt Publishi ing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews rt has been made in the preparation of this book to ensure the accuracy of the information presented However the information contained in this book is sold without warranty either express or implied. Neither the author nor packt Publishing and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals However, Packt Publishing cannot guarantee the accuracy of this information First published: March 2015 Production reference: 1110315 Published by Packt Publishing ltd Livery place 35 Livery street Birmingham b3 2PB UK ISBN978-1-78439-627-5 Credits Author Project Coordinator Sergey Barsky Rashi Khivansara Reviewers Proofreaders Erik Ejlskov Jensen Maria gould Andriy Svyryd Elinor Perry-Smith Commissioning editor Indexer Sarah crofton Mariamman Chettiyar Acquisition Editor Production coordinator Usha lye Content development editor Cover work Natasha d'souza Manu jose Technical editor Narsimha pai Copy Edit Deepa cambial About the author Sergey barskiy is an architect with Tyler Technologies. He lives in Atlanta, GA He has been developing software for almost 20 years. Sergey is a Microsoft MVP He holds these Microsoft certifications: MCPD, MctS, MCSD for NEt, MCAd for NET, MCDBA, and MCP Ile has been working with Microsoft Technologies for over 15 years. He is a frequent speaker at various regional and national conferences such as VS Live, DevLink, Code Stock, and Atlanta Code Camp, as well as local user groups. He is one of the organizers of Atlanta Code Camp. He authored articles for Code magazine Sergey barsky has been using entity Framework since it was first released to the public. He has deployed a number of projects to production that used Entity Framework over the years. He has used the Code-First approach on a few different projects as well. Sergey has produced an online video training course for this technology. He has spoken on Entity Framework Code-First at a number of national and regional conferences and events You can tweet to him at or e-mail him at I would like to thank my family for putting up with my busy schedule during the time I was working on this book. I want to also thank Packt Publishing for giving me the courage and opportunity to work on this project About the reviewers Erik eilskov Jensen is a Danish. net developer who specializes in. neT data development. He is a Microsoft MVP for SQL Server and shares tips and code via his blog at and Twitter at He is a project manager for a number of SQL Server Compact and SQLite tools on the Codeplex site and he is the creator of the popular free Visual Studio add-in SQL Server Compact/ SQLite Toolbox. He also contributes to a number of open source projects, including Entity Framework Andriy svyryd was born in Ukraine, and then he moved to Mexico, where he graduated from Universidad Nacional autonoma de mexico(UNAM). His first job was at microsoft, where he worked on several projects related to data modeling He was a developer on the entity framework team for 4 vears Support files, e Books, discount offers, and more For support files and downloads related to your book, please visit Did you know that Packt offers e Book versions of every book published, with PDF and ePub files available? You can upgrade to the ebook version at and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details At you can also read a collection of free technical articles sign up for a range of free newsletters and receive exclusive discounts and offers on packt books and ebooks ○ PACKTLIB book library. Here, you can search, access, and read Packt's entire library of books I Do you need instant solutions to your IT questions? PacktLib is Packt's online di Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser Free access for packt account holders If you have an account with packt at you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access Table of contents Preface Chapter 1: Introducing Entity Framework What is ORM? a brief history of Entity Framework The capabilities of entity framework The entity Framework architecture Self-test questions Summary Chapter 2: Your First Entity Framework Application Creating a new project that uses Entity Framework 11345667892 Creating a new database based on NET classes Saving a new record to the database Querying data in a database 15 Updating a record 16 Deleting a row from the database 17 Introduction to schema changes Self-test questions Summary 23 Chapter 3: Defining the Database Structure 25 Creating table structures 26 Mapping. NET types to sQL types 26 Configuring primitive properties 27 Handling nullable properties 33 Defining relationships 35 The One-to-Many relationship 35 The Many-to-Many relationship 41 The One-to-One relationship 42 Table of contents Self-test questions 44 Summary 45 Chapter 4: Querying, Inserting, Updating, and Deleting Data 47 The basics of LINQ 47 Filtering data in queries 49 Sorting data in queries 51 Exploring LINQ functions 52 Element operations 52 Quantifiers 53 Working with related entities 54 Filtering based on related data 54 Lazy and eager loading 55 Inserting data into the database 57 Updating data in the database 60 Deleting data from the database 65 Working with in-memory data 67 Self-test questions 69 Summary 70 Chapter 5: Advanced Modeling and Querying Techniques 73 Advanced modeling techniques 74 Complex ty 74 Using an explicit table and column mappings Adding supporting columns 78 Enumerations 79 Using multiple tables for a single entity 80 Advanced querying techniques 83 Projections 83 Aggregations and grouping 88 Advanced query construction 89 Paging data with windowing functions 92 Using joins 93 Groupings and left outer joins 95 Set operations 101 Self-test questions 102 ummary 104 Table of Contents Chapter 6: Working with Views, Stored Procedures, the Asynchronous APl, and Concurrency 105 Working with views 106 Working with stored procedures 110 Create, update, and delete entities with stored procedures 112 The asynchronous APl 115 Handling concurrency 119 Self-test questions 123 Summary 24 Chapter 7: Database Migrations and Additional Features 125 Enabling and running migrations 126 Using the migrations AP 130 Applying migrations 135 Applying migrations via a script 136 Applying migrations via migrate. exe 136 Applying migrations via an initializer 137 Adding migrations to an existing database 138 Additional Entity Framework features 139 Custom conventions 139 Geospatial data 140 Dependency injection and logging 140 Startup performance 141 Multiple contexts per database 141 Self-test questions 142 Summary 143 Appendix: Answers to Self-test Questions 145 Index 151

试读 127P CodeFirstDevelopmentwithEntityFramework.pdf 英文原版
立即下载 低至0.43元/次 身份认证VIP会员低至7折
weixin_38743737 欢迎大家使用并留下宝贵意见
  • 至尊王者

关注 私信 TA的资源
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版 10积分/C币 立即下载
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第1页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第2页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第3页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第4页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第5页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第6页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第7页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第8页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第9页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第10页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第11页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第12页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第13页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第14页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第15页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第16页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第17页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第18页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第19页
CodeFirstDevelopmentwithEntityFramework.pdf 英文原版第20页

试读结束, 可继续阅读

10积分/C币 立即下载 >