PriceElementService class inserts and updates PriceElement in the Database
Mer...
PriceElementService class inserts and updates PriceElement in the Database
Definisjon på linje 11 i filen PriceElementService.cs.
◆ PriceElementService()
Escali.LicenseControl.DataAccess.Services.PriceElementService.PriceElementService |
( |
DataContext |
db | ) |
|
◆ ActivatePriceElement()
async Task< PriceElement > Escali.LicenseControl.DataAccess.Services.PriceElementService.ActivatePriceElement |
( |
int |
id | ) |
|
Activates a PriceElement by setting IsActive attribute to false
- Parametre
-
- Returnerer
- Updated PriceElement
- Unntak
-
NullReferenceException | Thrown if id does not match a PriceElement id in the database |
Definisjon på linje 94 i filen PriceElementService.cs.
◆ AddPriceElement()
async Task< PriceElement > Escali.LicenseControl.DataAccess.Services.PriceElementService.AddPriceElement |
( |
PriceElement |
priceElement | ) |
|
Adds a PriceElement to the database
- Parametre
-
- Returnerer
- Added PriceElement object
- Unntak
-
DbUpdateException | Database error |
Definisjon på linje 52 i filen PriceElementService.cs.
◆ DeactivatePriceElement()
async Task< PriceElement > Escali.LicenseControl.DataAccess.Services.PriceElementService.DeactivatePriceElement |
( |
int |
id | ) |
|
Deactivates a PriceElement by setting IsActive attribute to false
- Parametre
-
- Returnerer
- Updated PriceElement
- Unntak
-
NullReferenceException | Thrown if id does not match a PriceElement id in the database |
Definisjon på linje 79 i filen PriceElementService.cs.
◆ GetAllPriceElements()
async Task< List< PriceElement > > Escali.LicenseControl.DataAccess.Services.PriceElementService.GetAllPriceElements |
( |
| ) |
|
Read all PriceElements from database
- Returnerer
- A List of PriceElements
Definisjon på linje 25 i filen PriceElementService.cs.
◆ GetPriceElementById()
async Task< PriceElement > Escali.LicenseControl.DataAccess.Services.PriceElementService.GetPriceElementById |
( |
int |
id | ) |
|
Read one PriceElement with id from database
- Parametre
-
- Returnerer
PriceElement with corresponding id
Null if PriceElement with id is not found
Definisjon på linje 40 i filen PriceElementService.cs.
◆ UpdatePriceElement()
async Task< PriceElement > Escali.LicenseControl.DataAccess.Services.PriceElementService.UpdatePriceElement |
( |
PriceElement |
priceElement | ) |
|
Updates changes on a PriceElement in the database
- Parametre
-
- Returnerer
- Updated PriceElement object
- Unntak
-
DbUpdateException | Database error |
DbUpdateConcurrencyException | Id doesn't exist |
Definisjon på linje 66 i filen PriceElementService.cs.
◆ _db
readonly DataContext Escali.LicenseControl.DataAccess.Services.PriceElementService._db |
|
private |
Dokumentasjonen for denne klasse ble generert fra følgende fil:
- C:/Users/Simen/Desktop/Escali-LicenseControl-FinalDelivery/Escali.LicenseControl.DataAccess/Services/PriceElementService.cs