DPS907 notes – Tue Oct 29
Various topics today. Programming assignment introduction.
.
Plans for the next week
Today – More web service topics. Programming assignment introduction.
Friday – Test 2.
Next Friday, November 8 – First due date for a part of the programming assignment.
.
Code examples for today
RelationOneToManySelf – shows the best practice way to create a one-to-many relationship with the same class
.
Return and discuss Test 1
Return and discuss Test 1
.
Programming assignment introduction
We’ll introduce and discuss the programming assignment.
.
Topics for today
Using a nullable type in app domain classes…
You can define a value type property as nullable in an app domain class. Then, the SQL Server database engine will create its table column with the “allow nulls” checked/set to true.
Two syntax forms are available to you. For example, to define a nullable int:
public int? Age { get; set; }
public Nullable<int> { get; set; }
When working with a nullable property (in repository code, for example), it has a useful extension method:
.
.
.
.
.
.
.