Simplified Data Access

Refactor Objectives

  • Get rid of EDMX
  • Adopt lightweight, code-first like approach
  • Leverage code generation
  • Simplify DAL by removing layers
  • Support navigation properties

Architecture Overview

Current Architecture Example: Reviews

BaseDAL

EF Context

Repository

PerfomanceManagementDAL

ReviewsData

LiveEmployeeReview

EmployeeReviewController

Views/UI

Data Layer

Business Logic

UI

Simplified Architecture: Reviews

EF Context

BaseRepository

LiveEmployeeReview

EmployeeReviewController

Views/UI

Data Layer

Business Logic

UI

Repository

Demo

New DataAccess Project

Business Logic Refactoring

Before: Step 1: Complicated Joins

Before: Step 2: Map from Intermediate Class

Before: Step 3: Map to Model for View

After: Step 1: Nav Properties in Repository

Before:

After:

After: Step 2: Map to Model for View

Made with Slides.com