Skip to content
This repository was archived by the owner on Feb 2, 2020. It is now read-only.
Michał B edited this page Feb 10, 2018 · 2 revisions

Description

  • This class describes the brand of a mass-produced car for the knowledge base.
  • This class is responsible for modeling the table representation in the database.
  • This class contains methods responsible for acting on it.
  • This class inherits from the Entity class.

Properties

Name Type Access Description
Name string public The name of the brand.
StartDate DateTime public Date of the brand's existence.
EndDate DateTime? public The end date of the existence of the brand.
Cars List<Car> public Virtual list of cars for 'one to many' relationship in Entity Framework Core.

Methods

Name Type Access Description
Brand - public Constructor initializing all object fields, including those related to Entity Framework Core.
Update void public The method for updating the brand name, the start date and the end date of existence.
SetName void private A method for validating and setting the brand name. Throws an ForbiddenValueException if the name of the brand does not pass the validation.
SetStartDate void private A method for validating and setting the brand start date. Throws an ForbiddenValueException if the brand start date does not pass the validation.
SetEndDate void private A method for validating and setting the brand end date. Throws an ForbiddenValueException if the brand end date does not pass the validation.

General


Technical documentation

  1. Models

Clone this wiki locally