C# Class persistence.CarServicePersister

Implements ICarServicePersister persistence facade.
Inheritance: ICarServicePersister
Show file Open project: TelerikAcademy/QA-Academy

Public Methods

Method Description
CarServicePersister ( ) : System

Creates object context and opens DB connection.

CreateAutomobile ( Automobile automobile ) : void
CreateRepairCard ( RepairCard repairCard ) : void
CreateSparePart ( SparePart sparePart ) : void
DeleteAutomobile ( Automobile automobile ) : void
DeleteRepairCard ( RepairCard repairCard ) : void
DeleteSparePart ( SparePart sparePart ) : void
GetActiveSpareParts ( ) : IQueryable
GetAutomobilById ( int automobileId ) : Automobile
GetAutomobiles ( ) : IQueryable
GetAutomobilesByVinChassis ( string vinChassis ) : IQueryable
GetFinishedRepairCards ( System.DateTime fromFinishRepair, System.DateTime toFinishRepair ) : IQueryable
GetRepairCardById ( int cardId ) : RepairCard
GetRepairCardMaxId ( ) : int
GetRepairCards ( ) : IQueryable
GetRepairCards ( string vinChassis ) : IQueryable
GetSparePartById ( int sparePartId ) : SparePart
GetSparePartMaxId ( ) : int
GetSpareParts ( ) : IQueryable
GetUnfinishedRepairCards ( System.DateTime startRepair, string vinChassis ) : IQueryable
IsChassisNumberExists ( string chasshisNumber ) : bool
IsVinExists ( string vin ) : bool
ReleaseConnection ( ) : void
SaveChanges ( ) : void

Private Methods

Method Description
GetRepairCardsByVinChassis ( string vinChassis ) : IQueryable
GetUnfinishedRepairCards ( ) : IQueryable
GetUnfinishedRepairCards ( System.DateTime startRepair ) : IQueryable
GetUnfinishedRepairCardsByVinChassis ( string vinChassis ) : IQueryable
GetUnfinishedRepairCardsByVinChassisStartDate ( System.DateTime startRepair, string vinChassis ) : IQueryable

Method Details

CarServicePersister() public method

Creates object context and opens DB connection.
public CarServicePersister ( ) : System
return System

CreateAutomobile() public method

public CreateAutomobile ( Automobile automobile ) : void
automobile Automobile
return void

CreateRepairCard() public method

public CreateRepairCard ( RepairCard repairCard ) : void
repairCard RepairCard
return void

CreateSparePart() public method

public CreateSparePart ( SparePart sparePart ) : void
sparePart SparePart
return void

DeleteAutomobile() public method

public DeleteAutomobile ( Automobile automobile ) : void
automobile Automobile
return void

DeleteRepairCard() public method

public DeleteRepairCard ( RepairCard repairCard ) : void
repairCard RepairCard
return void

DeleteSparePart() public method

public DeleteSparePart ( SparePart sparePart ) : void
sparePart SparePart
return void

GetActiveSpareParts() public method

public GetActiveSpareParts ( ) : IQueryable
return IQueryable

GetAutomobilById() public method

public GetAutomobilById ( int automobileId ) : Automobile
automobileId int
return Automobile

GetAutomobiles() public method

public GetAutomobiles ( ) : IQueryable
return IQueryable

GetAutomobilesByVinChassis() public method

public GetAutomobilesByVinChassis ( string vinChassis ) : IQueryable
vinChassis string
return IQueryable

GetFinishedRepairCards() public method

public GetFinishedRepairCards ( System.DateTime fromFinishRepair, System.DateTime toFinishRepair ) : IQueryable
fromFinishRepair System.DateTime
toFinishRepair System.DateTime
return IQueryable

GetRepairCardById() public method

public GetRepairCardById ( int cardId ) : RepairCard
cardId int
return RepairCard

GetRepairCardMaxId() public method

public GetRepairCardMaxId ( ) : int
return int

GetRepairCards() public method

public GetRepairCards ( ) : IQueryable
return IQueryable

GetRepairCards() public method

public GetRepairCards ( string vinChassis ) : IQueryable
vinChassis string
return IQueryable

GetSparePartById() public method

public GetSparePartById ( int sparePartId ) : SparePart
sparePartId int
return SparePart

GetSparePartMaxId() public method

public GetSparePartMaxId ( ) : int
return int

GetSpareParts() public method

public GetSpareParts ( ) : IQueryable
return IQueryable

GetUnfinishedRepairCards() public method

public GetUnfinishedRepairCards ( System.DateTime startRepair, string vinChassis ) : IQueryable
startRepair System.DateTime
vinChassis string
return IQueryable

IsChassisNumberExists() public method

public IsChassisNumberExists ( string chasshisNumber ) : bool
chasshisNumber string
return bool

IsVinExists() public method

public IsVinExists ( string vin ) : bool
vin string
return bool

ReleaseConnection() public method

public ReleaseConnection ( ) : void
return void

SaveChanges() public method

public SaveChanges ( ) : void
return void