Escali License control 1
Escali.LicenseControl.DataAccess.Services.ProductService Klasse Referanse

ProductService class inserts and updates Product in the Database Mer...

Public medlemsfunksjoner

 ProductService (DataContext db)
 
async Task< List< Product > > GetAllProducts ()
 Read all Products from database Mer...
 
async Task< List< Product > > GetAllProductWithChildren ()
 Read all Products from database included referenced tables Mer...
 
async Task< ProductGetProductById (int id)
 Read one Product with id from database Mer...
 
async Task< ProductAddProduct (Product product)
 Adds a Product to the database Mer...
 
async Task< ProductUpdateProduct (Product product)
 Updates changes on a Product in the database Mer...
 

Private attributter

readonly DataContext _db
 

Detaljert beskrivelse

ProductService class inserts and updates Product in the Database

Definisjon på linje 11 i filen ProductService.cs.

Konstruktør- & destruktør-dokumentasjon

◆ ProductService()

Escali.LicenseControl.DataAccess.Services.ProductService.ProductService ( DataContext  db)

Definisjon på linje 15 i filen ProductService.cs.

Medlemsfunksjon-dokumentasjon

◆ AddProduct()

async Task< Product > Escali.LicenseControl.DataAccess.Services.ProductService.AddProduct ( Product  product)

Adds a Product to the database

Parametre
product
Returnerer
Product Entity
Unntak
DbUpdateExceptionDatabase error

Definisjon på linje 68 i filen ProductService.cs.

◆ GetAllProducts()

async Task< List< Product > > Escali.LicenseControl.DataAccess.Services.ProductService.GetAllProducts ( )

Read all Products from database

Returnerer
A List of Products

Definisjon på linje 24 i filen ProductService.cs.

◆ GetAllProductWithChildren()

async Task< List< Product > > Escali.LicenseControl.DataAccess.Services.ProductService.GetAllProductWithChildren ( )

Read all Products from database included referenced tables

Returnerer
A List of Products

Definisjon på linje 34 i filen ProductService.cs.

◆ GetProductById()

async Task< Product > Escali.LicenseControl.DataAccess.Services.ProductService.GetProductById ( int  id)

Read one Product with id from database

Parametre
id
Returnerer

Product with corresponding id

Null if Product with id is not found

Definisjon på linje 56 i filen ProductService.cs.

◆ UpdateProduct()

async Task< Product > Escali.LicenseControl.DataAccess.Services.ProductService.UpdateProduct ( Product  product)

Updates changes on a Product in the database

Parametre
product
Returnerer
The updated Product entity
Unntak
DbUpdateExceptionDatabase error
DbUpdateConcurrencyExceptionId doesn't exist

Definisjon på linje 86 i filen ProductService.cs.

Medlemsdata-dokumentasjon

◆ _db

readonly DataContext Escali.LicenseControl.DataAccess.Services.ProductService._db
private

Definisjon på linje 13 i filen ProductService.cs.


Dokumentasjonen for denne klasse ble generert fra følgende fil: