This repository has been archived by the owner on Feb 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Company
Michał B edited this page Mar 31, 2018
·
3 revisions
- This class describes a company dealing in tuning, maintenance or restoration of cars.
- 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.
Name | Type | Access | Description |
---|---|---|---|
Name | string | public | The name of the company. |
Phone | string | public | The company phone number. |
CompanyAddressId | int | public | Address ID for 'one to one' relationship in Entity Framework Core. |
CompanyAddress | CompanyAddress | public | Virtual address variable for 'one to one' relationship in Entity Framework Core. |
Name | Type | Access | Description |
---|---|---|---|
Company | - | public | Constructor initializing all object fields, including those related to Entity Framework Core. |
Update | void | public | The method for updating the company name and phone number. |
SetName | void | private | A method for validating and setting the company name. Throws an ForbiddenValueException if the name of the company does not pass the validation. |
SetPhone | void | private | A method for validating and setting the company phone number. Throws an ForbiddenValueException if the phone number of the company does not pass the validation. |