Data - HammerheadShark666/jwm-photography GitHub Wiki

Overview

The Photography Data folder contains the repository classes. The repository classes provide the functions to get data from the database and to save/delete data in the database.

The following repositories are in the project.

  • CategoryRepository
  • CountryRepository
  • FavouriteRepository
  • GalleryPhotoRepository
  • GalleryRepository
  • MontageRepository
  • PaletteRepository
  • PhotoRepository
  • UserGalleryPhotoRepository
  • UserGalleryRepository
  • UserRepository

Each of the repositories is accessed via a unit of work class.

The database is an Azure Sql database, built through the code first approach. The PhotographySiteDbContext class is used to describe the tables that are to be created using the domain objects. Base data is also added in the PhotographySiteDbContext class. Then the database can be created and altered through migrations.

Code

The code for Data can be found at code