This class provides an introduction to Microsoft’s Entity Framework, one of the leading object-relational mapper frameworks in use today. With Entity Framework, developers can focus more of their efforts on dealing with how objects in their problem domain relate to each other, and spend less effort worrying about data-persistence code. The class examines the Code First style of development, including POCO classes, DbContext configuration, and how to integrate the resulting Entity Framework model in various different project types (including a console app and AutoCAD software-based applications). We’ll use a console project to create and edit some database records, then demonstrate how to use the Entity Framework model in an AutoCAD .NET API project to read data from the database and populate an AutoCAD software table.
- Learn how to create an Entity Framework model from an existing database using Code First
- Learn how to configure database options using Fluent API and DataAnnotations
- Learn how to work with Entity Framework objects such as DbContext and DbSet to create, retrieve, update, and delete database records
- Learn how to create AutoCAD objects with data queried from a database via the Entity Framework model
Ben Rand has been using AutoCAD software since Release 12. He learned to program using LISP in AutoCAD, worked his way up through VBA, VB6 and VB.NET, and now spends most of his days programming in C# (occasionally still in AutoCAD!). He has worked in the Industrial Engineering field for more than 17 years as a CAD Manager, developer and IT Director. In 2013, he was the 2013 Top DAUG overall winner at AU, and he served a mentor for the AutoCAD Mentor All-Star team. Ben is the proud father of four children and enjoys reading and playing a variety of sports including pickleball, volleyball, and tennis. In 2017, Ben was a member of a USTA men's league team that placed 3rd in the entire country.