Presentation is loading. Please wait.

Presentation is loading. Please wait.

consultant/mentor Microsoft MVP, INETA Speaker, ASPInsider, MCP, VTdotNET Leadercontact twitter theDataFarm.com/blog.

Similar presentations


Presentation on theme: "consultant/mentor Microsoft MVP, INETA Speaker, ASPInsider, MCP, VTdotNET Leadercontact twitter theDataFarm.com/blog."— Presentation transcript:

1

2

3 consultant/mentor Microsoft MVP, INETA Speaker, ASPInsider, MCP, VTdotNET Leadercontact jlerman@theDataFarm.com www.thedatafarm.comblog twitter theDataFarm.com/blog twitter @julielerman book web site LearnEntityFramework.com

4

5 Database Data Access UI LINQ & some Logic Business Logic

6 Extensibl eAdaptableTestable Maintainable Sensible!

7 UI Business/Domain Layer Repository/Unit of Work Infrastructure/Data Access Repository/Unit of Work Infrastructure/Data Access Entity Framework LINQ Tests Database Service Layer

8

9 Entity Framework DbContext Customers Sales Orders Products Payments Shipments Shippers Promotions SalesPeople Employees SalaryHistory Returns

10 Delimits the applicability of a particular model. BOUNDING CONTEXTS gives team members a clear and shared understanding of what has to be consistent and what can develop independently. - Domain Driven Design, Eric Evans 2003

11

12 Customer Service Sales Billing Returns Human Resources Shipping Marketing

13 Customer Service Sales Billing Returns Marketing Human Resources Shipping Customers SalesPeople Shipments Shippers Order Items Customer ShipAddress Customer Order Customer Payments Employee SalaryHistory Order Customer RMA Credit Items Customer Service Customer SalesPerson Addresses ContactHistory Promotion Customers Communications

14 Customer Service Sales Billing Returns Marketing Human Resources Shipping Customers SalesPeople Shipments Shippers Order ShipAddress Payments Employee SalaryHistory Customer RMA Credit Customer Service Customer SalesPerson Addresses ContactHistory Promotion Communications ItemsToShip Recipient ItemsOrdered Purchaser Invoice Payee ItemReturned Order Contacts “Ubiquitous Language”

15

16 “Parent” Entity Related EntityA Related Entity B Related EntityA Related EntityA Aggregate Root

17

18

19

20 Entity Framework/Queries/Commands Domain Model Persistence Model Payments Invoices Customers DB Mappings, DB concerns, Follow EF rules Domain Model Payments Credit Invoice Payee Payments Credit Invoice Payee Credits

21

22 “Encapsulate Redundant Data Access Code”

23 UI Business/Domain Layer Repository/Unit of Work Infrastructure/Data Access Repository/Unit of Work Infrastructure/Data Access Entity Framework LINQ Tests Database Service Layer

24 GetOrderById AddOrder RemoveOrder GetAllOrders GetCurrentOrders GetCachedOrders GetOrdersForCustomer Remove GetOrdersForProduct Persist

25 One repo per type? Read repos? Write repos? One repo per aggregate ? One repo per context?

26 Customer Repo Order Repo Address Repo Customer Orders Addresses Aggregate Root Order Items

27 Integration/ Interaction Tests Unit Tests EF Validation, State: No biggie DB: DropCreateDatabaseAlways

28 Unit of Work Classes UI Tests System.Data.Entity Metadata & DbContexts Fake Context & DataA Fake DbSet Fake Context & Data B ositories Repositories Classes

29

30

31 consultant/mentor Microsoft MVP, INETA Speaker, ASPInsider, MCP, VTdotNET Leadercontact jlerman@theDataFarm.com www.thedatafarm.comblog twitter theDataFarm.com/blog twitter @julielerman book web site LearnEntityFramework.com

32 TODAY

33 http://microsoft.com/msdn www.microsoft.com/learning http://channel9.msdn.com/Events/TechEd http://microsoft.com/technet

34

35

36


Download ppt "consultant/mentor Microsoft MVP, INETA Speaker, ASPInsider, MCP, VTdotNET Leadercontact twitter theDataFarm.com/blog."

Similar presentations


Ads by Google