Dotnet
User Profile

Exercise - Add Models And Exceptions

PRO
Outline

Exercise: Adding Models & Exceptions

Now that we have our data models & context updated in the database, let's create a response model for the User Profile along with a custom exception.

In the Conduit.Models Project:

Add a new class to the Exception namespace

Called it ProfileNotFoundException

Add a new class to the Responses namespace

Called it UserProfile

Add the following properties to UserProfile
Visibility  | Type   | Name
---------------------------------
  public    | string | UserName
  public    | string | Bio
  public    | string | Image
  public    | bool   | Following

In the next video I'll show you the solution I came up with.

 

I finished! On to the next chapter