BTI420 Assignment 1

Assignment 1 specifications.


Assignment 1 due date

There is an interim progress due date, and a final due date.

For section B, the interim progress will be assessed in-class on:
Thursday, March 12, 2015, at 8:00am ET

For section A, the interim progress will be assessed in-class on:
Monday, March 16, 2015, at 1:30pm ET

For all BTI420 students the final due date is:
Monday March 23, 2015, at 11:00pm ET


Assignment 1 topic

Everyone has suggestions on how to make this academic program (Software Development) better. Sometimes the suggestion is program-related, sometimes course-related, and sometimes school- or College-related.

We need an app that enables a student or teacher to create a suggestion for improvement. The suggestion can then be amended and tracked. 


Interim progress requirements

Completed design model.

Some initial data for the Program and Course entities (using your own code).

Includes the identity and authentication components.

‘Suggestion’ entity add and display.

‘FollowUp’ entity add and display.

Deployed to Microsoft Azure.


Final requirements

Above, plus:

Imports Program and Course data from comma-separated-values (CSV) files.

Full data management of ‘Suggestion’ and ‘FollowUp’ entities (including edit and delete).

Attachment (internet media types) handling – upload and delivery.

Evidence of care and craftsmanship, and a suitable user interface


Getting started

Create a new project, named Suggestions.

Choose “Individual User Accounts”. When you do this, the project will include the components needed for identity management (i.e. user accounts), and authentication. These components use a database-hosted persistent store, so the Entity Framework components are also included in the project.

Using the NuGet package manager, add AutoMapper to the project.



The project template is a bit different from the projects that you have created. As a result, there are a few fixes that must be done.

  • ApplicationUser, more properties
  • Data context name
  • Connection string name
  • Data store name


In the Models folder, the template creates a source code file named IdentityModels.cs. It includes the ApplicationUser class, and the ApplicationDbContext class.

We can add additional ‘custom’ properties to the ApplicationUser class. It would be a good idea to add two string properties, for FirstName and LastName.

What properties are already in ApplicationUser?

Click to select the ApplicationUser class name, then press F12. It will show you the definition of the IdentityUser class. Click that class name, then press F12, to see the base class, and all its properties.

Data context name

In that source code file, the app’s ‘data context’ class is defined. Its name is ApplicationDbContext (which is a bit different from what you have done in the past), and its superclass is a bit different (because it includes the bits needed for security).

The base connection string – DefaultConnection – must be changed to the string that we have been using in our apps, “DataContext”.

Connection string and data store names

In the app’s Web.config source code file, change the connection string name (to match the one above, “DataContext”).

Next, change the database name. The template-provided name is a very long string, and it does not have to be that long. Change it to a simpler name, maybe one that matches the project’s name (“Suggestions”).

... AttachDbFilename=|DataDirectory|\Suggestions.mdf;Initial Catalog=Suggestions; ...


Design model classes

There will be at least four (4) entity classes:

  1. Program
  2. Course
  3. Suggestion
  4. FollowUp


The Program and Course entities are defined below. They have a many-to-many association, and will be used as ‘lookup’ collections (for the Suggestion entity).

To get started, you can use your own code (in a store initializer class) to create some initial data for these entity collections.

Soon, your professor will give you more data for these entity collections, and teach you how to ‘import’ the data into your app.

The Suggestion and FollowUp entities are defined below. They have a one (Suggestion) to many (FollowUp) association. We may add other associations (to FollowUp) soon.

Add a DesignModelClasses.cs source code file and code the entities now.

Follow best practices. Yes, you must use data annotations.

After you code the classes, add DbSet<TEntity> properties for their entity collections (in the IdentityModels.cs source code file).


Program entity

  • Id
  • Code (string, e.g. BSD)
  • Name (string)
  • Description (string, longer)
  • Credential (string
  • (nav) collection of Course objects

Course entity

  • Id
  • Code (string, e.g. BSD)
  • Name (string)
  • Description (string, longer)
  • (nav) collection of Program objects

Suggestion entity

  • Id
  • Timestamp (DateTime)
  • Title (short text)
  • Description (longer)
  • Program (string)
  • Course (string)
  • Attachment (byte array)
  • ContentType (string)
  • (nav) collection of FollowUp objects

FollowUp entity

  • Id
  • Timestamp (DateTime)
  • Title
  • Description
  • Attachment
  • ContentType
  • (nav) to the Suggestion object (required)


Plan and code the add and display features for the Suggestion entity

Plan and code the ‘add’ and ‘display’ features for the FollowUp entity.

This task includes all the associated sub-tasks, including the creation of view model classes, a Manager class, usage of AutoMapper mappings, and so on.

At this point in the course, you should be creating a series of view model classes to handle typical use cases, including…

  • List
  • AddForm
  • Add
  • Base
  • Base (with related object(s))

Yes, you must use data annotations, because it’s a best practice.


Plan and code the add and display features for the FollowUp entity

Plan and code the ‘add’ and ‘display’ features for the FollowUp entity.

Remember that a FollowUp object has a required association to a Suggestion object. Therefore, on the ‘add’ view, you will need a user interface object (select or input element) to enable the selection of a “Suggestion” object.


Code First Migrations, and store initializer

In the March 10 class/session, you learned how to enable Code First Migrations.

Add this feature to your project, before you attempt to deploy to Azure.


Deploy to Microsoft Azure

On or before our March 10 class/session, you will learn how to deploy a web app to a Microsoft Azure hosted web site. Each BTI420 student has a free Azure Pass, courtesy of Microsoft. The pass will be distributed in-class on March 10.

Before then, you must create a Microsoft Account. Your professor recommends that you create a Microsoft Account by using the following procedure. This will enable you to use another Azure Pass in the future (for your third-year systems project, or a pro option course).

Visit this page to get started:

The “user name” is important. Create a composite name, using a personal identifier, and the string ‘bti420’. For example, if my personal identifier was ‘pmcintyre’, then my user name would be ‘’.

During the Account configuration process, and the Azure configuration process, Microsoft will send you a few email messages, so be sure to login to with your new Microsoft Account.

(As noted above, you will receive an Azure Pass during the March 10 class/session.)


Import data from comma-separated-values (CSV) files

On My.Seneca/Blackboard, a zip file has been posted. Download the zip file. It contains CSV files with Program and Course data.

Use the technique you learned on March 17 to import the data into your app.

Before you import, remove the existing data that you loaded earlier. You can probably do that with the Clear() method:



Load the Program data first. Then, get a reference to the BSD program object that was just added, so you can use it when you load Course data.

Load the Course data next. As you configure each Course object, add the BSD program object to its Programs collection before adding and saving the Course object.


Full data management of ‘Suggestion’ and ‘FollowUp’ entities

The controllers for these entities need the ‘edit’ and ‘delete’ functionality added.

Follow best practices.

Be aware that the default behaviour of the data store is that cascading deletes are not permitted. Therefore, during testing, if you’re wondering why you cannot delete a Suggestion object that has a collection of one or more FollowUp objects, this is the reason.


Attachment (internet media types) handling – upload and delivery

Implement the technique you learned on March 17 to add attachment handling to your project.


Submit your work on My.Seneca/Blackboard

The instructions are similar to those from Lab 1. Here’s a brief version:

1. Make a copy of your work, and remove the packages, bin, and obj folders.

2. Create a compressed (zip) version of your solution’s folder.

3. Login to My.Seneca/Blackboard

4. Navigate to the BTI420 Assignments area, and use the link to upload/submit your work
















  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: