C# Класс CardShop.Service.BaseballCardService

Наследование: DbContext, IBaseballCardService
Показать файл Открыть проект

Открытые методы

Метод Описание
BaseballCardService ( ) : System
Create ( BaseballCard baseballCard ) : void

Adds a new BaseballCard to DBSet

Delete ( int id ) : void

This method is not implemented yet

GetAllCards ( ) : List

Calls the DBSet.ToList() Method and returns all cards in list format.

GetBaseballCard ( int id ) : BaseballCard

Finds a single BaseballCard by the Id passed into the method. calls DBSet.Find(id)

SaveChanges ( ) : void

Calls DBContext.SaveChanges to save anything that may have changed in the DBContext

Update ( BaseballCard baseballCard ) : void

Updates BaseballCard in DBSet with information

Защищенные методы

Метод Описание
OnModelCreating ( DbModelBuilder modelBuilder ) : void

Override to the DBContext Method to map entity to right table.

Описание методов

BaseballCardService() публичный метод

public BaseballCardService ( ) : System
Результат System

Create() публичный метод

Adds a new BaseballCard to DBSet
public Create ( BaseballCard baseballCard ) : void
baseballCard CardShop.Models.BaseballCard BaseballCard to be added to the DBSet
Результат void

Delete() публичный метод

This method is not implemented yet
public Delete ( int id ) : void
id int Id of the card to be deleted from the DBSet
Результат void

GetAllCards() публичный метод

Calls the DBSet.ToList() Method and returns all cards in list format.
public GetAllCards ( ) : List
Результат List

GetBaseballCard() публичный метод

Finds a single BaseballCard by the Id passed into the method. calls DBSet.Find(id)
public GetBaseballCard ( int id ) : BaseballCard
id int Id of the baseballCard to be found in DBSet
Результат CardShop.Models.BaseballCard

OnModelCreating() защищенный метод

Override to the DBContext Method to map entity to right table.
protected OnModelCreating ( DbModelBuilder modelBuilder ) : void
modelBuilder DbModelBuilder
Результат void

SaveChanges() публичный метод

Calls DBContext.SaveChanges to save anything that may have changed in the DBContext
public SaveChanges ( ) : void
Результат void

Update() публичный метод

Updates BaseballCard in DBSet with information
public Update ( BaseballCard baseballCard ) : void
baseballCard CardShop.Models.BaseballCard BaseballCard to update
Результат void