3. What’s wrong?
We want to move to Azure
Typical dependency structure
We want to add a thick client against ADO for
our existing web to Azure.
4. What’s wrong?
We want to move to Azure
Typical dependency structure Persistence change = somewhere
between massive rework to lots of code
adjustments
We want to add a thick client against ADO for
our existing web to Azure.
UI against multiple data layers=
somewhere between massive rework and
lots of searching for dependencies
5. We need something more adaptable
• We want to be able to swap out these layers
with ease, or even on the fly.
7. How?
• EF layer
– Entities implement shared interfaces
– Context implements IRepository<T>
– T4 for automation
– Query Interception
• EF does not allow nor handle IQueryable<T> where T:
(parent to an Entity)
19. Domain – Data Layer check-mate
SELECT
[Extent2].[ID] AS [ID],
[Extent2].[DealID] AS [DealID],
[Extent2].[ScenarioNumber] AS [ScenarioNumber],
[Extent2].[ServiceCodeID] AS [ServiceCodeID],
[Extent2].[CountryCode] AS [CountryCode],
[Extent2].[CurrencyCode] AS [CurrencyCode],
[Extent2].[PriceListID] AS [PriceListID],
[Extent2].[BranchID] AS [BranchID],
[Extent2].[ExchangeRate] AS [ExchangeRate],
[Extent2].[Volume] AS [Volume],
[Extent2].[ActualPrice] AS [ActualPrice],
[Extent2].[CurrentPrice] AS [CurrentPrice],
[Extent2].[StandardPrice] AS [StandardPrice],
[Extent2].[MinVol] AS [MinVol],
[Extent2].[MaxVol] AS [MaxVol],
FROM [Treasury].[Deal] AS [Extent1]
INNER JOIN [Treasury].[DealActivity] AS [Extent2] ON [Extent1].[DealID] = [Extent2].[DealID]
WHERE [Extent1].[RegionID] IN (5,1,6,4,2)
20. UI layer - How?
• Controller requires appropriate Model(s)
• No dependencies on the data layer