DRAG DROP
Case Study
Background
Fabrikam is a commercial bank. The primary customers are individuals and employers with up to 10,000
employees. Fabrikam provides Internet banking services to customers.
You are developing a Universal Windows Platform (UWP) app for Fabrikam that extends the Internet banking to a UWP app.
Business Requirements
Core functionality
Users must be able to access accounts, view balances, view recent transactions, and deposit checks by using the UWP app.
Usability
The app must use industry proven design patterns across the app. All navigational elements must be visible at all times.
Security
The app must provide secure transactions to protect customer privacy.
Technical Requirements
Data
The app must use a file based database. You must use a code first entity framework approach.
User interface
You must use a Model-View-ViewModel (MVVM) pattern.
Users must be able to access all content through the top-level navigation after they sign in.
The app must allow the user to upload up to 50 images (front and back) of checks to deposit.
During the upload process, the app must be responsive to any other user actions.
The app must only upload images when no other pending inputs are in the queue.
You must implement the following pages:
Network and web service
The app must meet the following requirements related to networking and web services:
Connect to a web service over a secure HTTP connection to upload images.
Connect to Fabrikam’s core web service to retrieve account information.
Use networking technology already available in the .Net Framework.
Consume the JSON that the Fabrikam core web service provides.
User data and alerts
The app must meet the following requirements related to user data and alerts:
Download new monthly bank statements when possible. The download process must not affect the performance of the app.
Report to the user when the statements are downloaded to the device.
Write a log entry when statement downloads are not successful.
Periodically check for user activity and automatically log the user out when there is no activity for more than
15 minutes.
Security
The app must meet the following requirements related to security:
Use a multi-factor authentication (MFA) by using email and a verification code to identify the user.
Securely store credentials and retrieve credentials.
Automatically sign in the user irrespective of the device that is used to sign in to the app.
Store the resource name within the app itself.
Connect to an authentication app by using the URI schema fabrikam-security://oauth/.
Application Structure
AccountContext.cs
Relevant portions of the app files are shown below. Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
ImageManager.cs
Relevant portions of the app files are shown below. Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
ClientProxy.cs
Relevant portions of the app files are shown below. Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
BkgTaskMgr.cs
Relevant portions of the app files are shown below. Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
CredentialManager.cs
Relevant portions of the app files are shown below. Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
MainPage.cs
Relevant portions of the app files are shown below. Line numbers in the code segments are included for reference only and include a two-character prefix that denotes the specific file to which they belong.
You need to insert code at line AC07 to create the database entities.
How should you complete the relevant code? To answer, drag the appropriate code segments to the correct location. Each code segments may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
Select and Place:
Explanation:
From scenario:
The app must use a file based database. You must use a code first entity framework approach.
The DbContextOptionsBuilder Class provides a simple API surface for configuring DbContextOptions.
Databases (and other extensions) typically define extension methods on this object that allow you to configure the database connection (and other options) to be used for a context.
A DbSet<TEntity> can be used to query and save instances of TEntity. LINQ queries against a DbSet<TEntity>
will be translated into queries against the database.
UseModel(IModel) sets the model to be used for the context. If the model is set, then OnModelCreating (ModelBuilder) will not be run.https://docs.microsoft.com/en-us/ef/core/api/microsoft.entityframeworkcore.dbcontextoptionsbuilder