深入实践Entity Framework Core 2nd版

需积分: 9 21 下载量 86 浏览量 更新于2024-07-09 收藏 7.83MB PDF 举报
"Entity Framework Core in Action 2nd Edition 是一本深入探讨 Entity Framework Core 的书籍,由 JonPSmith 撰写,Julie Lerman 撰写前言。本书覆盖了从设置 EF Core 到性能优化的广泛主题,旨在帮助开发者全面掌握这一流行的 ORM 工具在实际项目中的应用。" 本书主要涵盖了以下知识点: 1. **设置 EF Core**:在第 1、2 和 7 章中介绍,包括如何安装、配置和初始化 Entity Framework Core,确保开发环境准备就绪。 2. **查询数据库**:在第 3.1、3.2 和 6.8 至 6.10 章讲解,涵盖了如何使用 LINQ 或原始 SQL 查询数据,以及各种查询操作和技巧。 3. **创建、更新、删除**:在第 1.6、1.8 和 6.8 至 6.10 章讨论,涵盖了如何通过 EF Core 插入、更新和删除数据库记录。 4. **EF Core 内部工作原理**:在第 4.2、4.4 和 5.4 章中探讨,揭示了 EF Core 如何与数据库交互,以及其内部机制。 5. **业务逻辑**:第 5.1 和 5.4 章涉及如何在 EF Core 中实现和管理业务逻辑,以满足应用程序的需求。 6. **ASP.NET Core**:在第 5.2 和 5.3 章中介绍,讲解如何在 ASP.NET Core Web 应用程序中集成和使用 EF Core。 7. **依赖注入**:在第 5.8 和 5.9 章讨论,阐述如何利用 .NET Core 的依赖注入容器来管理 EF Core 的上下文实例。 8. **异步编程**:第 7.1 和 7.2 章讲述了如何在 EF Core 中使用 async/await 进行非阻塞操作,提高应用程序的性能和响应性。 9. **非关系型数据库配置**:在第 8.1 至 8.4 章中介绍,涵盖了如何配置 EF Core 以支持非关系型数据库,如 NoSQL 数据库。 10. **关系配置**:第 8.12 和 8.13 章讲解了如何定义和管理实体之间的关系,如一对一、一对多和多对多关系。 11. **表映射配置**:在第 9.2 至 9.8 章中,详细阐述了如何自定义实体到数据库表的映射,以满足特定需求。 12. **数据库迁移**:第 10.3 至 10.7 及 15.7 章讨论了数据库模型变更时的迁移策略,以保持数据库结构与代码同步。 13. **并发问题处理**:在第 15.3 章中,介绍了如何处理并发冲突,确保数据的一致性和完整性。 14. **使用原始 SQL**:在第 13.3、4.2、13.4 和 13.5 章中,展示了如何在必要时直接执行 SQL 查询,以获得更细粒度的控制。 15. **领域驱动设计(DDD)**:在第 14.1、15.2、15.4、15.9、16.7 和 16.8 章中,介绍了如何结合 EF Core 实现领域驱动设计原则,构建更健壮的系统。 16. **性能调优**:在第 16.1、16.3、16.4 和 17.5 章中,提供了性能优化的策略和最佳实践,以提升 EF Core 应用的运行效率。 17. ** CosmosDB 和其他数据库**:在第 4、7 和 10 章中,讲解了如何使用 EF Core 配合 Azure Cosmos DB 或其他数据库服务。 18. **数据验证**:第 17.2 和 17.3 章介绍了数据验证的机制,确保输入数据的质量。 19. **单元测试**:在附录 A.2 和 A.1 章中,提供了编写和执行针对 EF Core 的单元测试的方法和示例。 本书是针对 Entity Framework Core 的综合指南,无论你是初学者还是经验丰富的开发者,都能从中受益,提升在 .NET 开发中的数据库操作技能。
2018-11-15 上传
Summary Entity Framework Core in Action teaches you how to access and update relational data from .NET applications. Following the crystal-clear explanations, real-world examples, and around 100 diagrams, you'll discover time-saving patterns and best practices for security, performance tuning, and unit testing. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology There's a mismatch in the way OO programs and relational databases represent data. Enti ty Framework is an object-relational mapper (ORM) that bridges this gap, making it radically easier to query and write to databases from a .NET application. EF creates a data model that matches the structure of your OO code so you can query and write to your database using standard LINQ commands. It will even automatically generate the model from your database schema. About the Book Using crystal-clear explanations, real-world examples, and around 100 diagrams, Entity Framework Core in Action teaches you how to access and update relational data from .NET applications. You'l start with a clear breakdown of Entity Framework, long with the mental model behind ORM. Then you'll discover time-saving patterns and best practices for security, performance tuning, and even unit testing. As you go, you'll address common data access challenges and learn how to handle them with Entity Framework. What's Inside Querying a relational database with LINQ Using EF Core in business logic Integrating EF with existing C# applications Applying domain-driven design to EF Core Getting the best performance out of EF Core Covers EF Core 2.0 and 2.1
2018-07-18 上传
Summary Entity Framework Core in Action teaches you how to access and update relational data from .NET applications. Following the crystal-clear explanations, real-world examples, and around 100 diagrams, you'll discover time-saving patterns and best practices for security, performance tuning, and unit testing. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the Technology There's a mismatch in the way OO programs and relational databases represent data. Entity Framework is an object-relational mapper (ORM) that bridges this gap, making it radically easier to query and write to databases from a .NET application. EF creates a data model that matches the structure of your OO code so you can query and write to your database using standard LINQ commands. It will even automatically generate the model from your database schema. About the Book Using crystal-clear explanations, real-world examples, and around 100 diagrams, Entity Framework Core in Action teaches you how to access and update relational data from .NET applications. You'l start with a clear breakdown of Entity Framework, long with the mental model behind ORM. Then you'll discover time-saving patterns and best practices for security, performance tuning, and even unit testing. As you go, you'll address common data access challenges and learn how to handle them with Entity Framework. What's Inside Querying a relational database with LINQ Using EF Core in business logic Integrating EF with existing C# applications Applying domain-driven design to EF Core Getting the best performance out of EF Core Covers EF Core 2.0 and 2.1