C# 클래스 CardShop.Service.BaseballCardService

상속: DbContext, IBaseballCardService
파일 보기 프로젝트 열기: egreene/PracticeGDVP

공개 메소드들

메소드 설명
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