Code-first Entity Framework with Legacy Databases
Pluralsight
Course Summary
Most code generators are inflexible, but with the Entity-Framework Reverse POCO Generator, you can create code exactly how you want it. You'll learn how to reverse-engineer a legacy or current SQL Server database into Code-first Entity-Framework code.
-
+
Course Description
With EDMX support fading away, it's even more important to use code-first as EF7 approaches. Most generators are rigid and don't provide you any flexibility in how the code is to be generated. But in this course, Code-first Entity Framework with Legacy Databases, we will be using the "Entity-Framework Reverse POCO Generator", a free visual studio tool, available at www.ReversePoco.com. This generator has been designed from the ground up to be customizable, and produce the code you would have done if you hand-coded it yourself. This course will show you what each of the various settings has on the generated code, and you'll also learn how to create separate data and model projects, as well as create repositories, unit tests and integration tests. By the end of this course, you will be able to flexibly generate code that meets your needs.
-
+
Course Syllabus
Introduction and Project Overview- 15m 28s
—Introduction 0m 28s
—Module Overview 0m 33s
—What Is Reverse Engineering? 0m 51s
—Entity Framework Prerequisites 0m 21s
—What Code-first Means 1m 24s
—Installation into a New Project 1m 5s
—Visual Studio Gallery Website 0m 16s
—Codeplex Website 0m 13s
—Why Not Use the Microsoft Generator? 1m 15s
—Demo Introduction 0m 20s
—Demo 8m 5s
—Summary 0m 31sGenerating Code First Types from an Existing Database- 48m 46s
—Introduction 0m 9s
—Module Overview 0m 14s
—Demo Introduction 0m 11s
—Namespace 2m 23s
—DbContextName 1m 15s
—DbContextInterfaceBaseClasses and MakeClassesPartial 6m 55s
—ConnectionStringName and ConfigFilenameSearchOrder 2m 1s
—TargetFrameworkVersion 1m 0s
—ConfigurationClassName 1m 9s
—GenerateSeparateFiles 1m 33s
—UseCamelCase 3m 33s
—IncludeComments and IncludeExtendedPropertyComments 3m 37s
—IncludeViews 1m 0s
—IncludeTableValuedFunctions 2m 51s
—DisableGeographyTypes 1m 39s
—CollectionType 4m 23s
—AddUnitTestingDbContext 1m 29s
—IncludeQueryTraceOn9481Flag 3m 56s
—AdditionalNamespaces 1m 29s
—AdditionalContextInterfaceItems 3m 38s
—WCF 3m 52s
—Summary 0m 20sIsolating the Relevant Database Objects- 15m 41sOrganizing the Generated Code- 21m 46sCustomizing the Generated Code- 31m 7sWorking with Entity Framework Migrations- 19m 35sTesting the Code-first Access Layer- 19m 43s