C# Class DriverManager.DataProviders.DriverDataProvider

Data Provider to provide a simple set of Drivers. Acting as a Database to allow the user to add/remove/update Drivers.
Inheritance: IDriverDataProvider
Show file Open project: smclark/DriverManager

Public Methods

Method Description
Delete ( IDriver driver ) : OpResult

Deletes the specified driver.

DriverDataProvider ( ) : System
GetAll ( ) : IList

Retrieve all the Drivers.

GetById ( int id ) : IDriver

Gets a Driver by the ID.

GetByName ( string driverName ) : IDriver

Gets a Driver by their FullName property.

Save ( IDriver driver ) : OpResult

Saves a New Driver to the "DB".

Update ( IDriver driver ) : OpResult

Updates the an existing Driver.

Method Details

Delete() public method

Deletes the specified driver.
NULL Driver passed into method
public Delete ( IDriver driver ) : OpResult
driver IDriver The driver
return OpResult

DriverDataProvider() public method

public DriverDataProvider ( ) : System
return System

GetAll() public method

Retrieve all the Drivers.
public GetAll ( ) : IList
return IList

GetById() public method

Gets a Driver by the ID.
public GetById ( int id ) : IDriver
id int The ID associated with the Driver.
return IDriver

GetByName() public method

Gets a Driver by their FullName property.
public GetByName ( string driverName ) : IDriver
driverName string The FullName associated with the Driver.
return IDriver

Save() public method

Saves a New Driver to the "DB".
public Save ( IDriver driver ) : OpResult
driver IDriver The new Driver.
return OpResult

Update() public method

Updates the an existing Driver.
public Update ( IDriver driver ) : OpResult
driver IDriver The updated Driver.
return OpResult