C# Class Superheroes.Services.SuperheroesService

Inheritance: ISuperheroesService
ファイルを表示 Open project: TelerikAcademy/Databases

Public Methods

Method Description
AddPowerToSuperhero ( Superhero superhero, string powerName ) : void
CreateSuperhero ( string superheroName, string secretIdentity, string cityName ) : Superhero
CreateSuperhero ( string superheroName, string secretIdentity, string cityName, IEnumerable powerNames ) : Superhero
GetAllSuperheroes ( ) : IQueryable
GetSupeheroesWithPower ( string powerName ) : IQueryable
SuperheroesService ( IUnitOfWork unitOfWork, IRepository superheroes, IRepository powers, IRepository cities ) : System

Private Methods

Method Description
LoadOrCreateCity ( string cityName ) : City
LoadOrCreatePower ( string powerName ) : Power

Method Details

AddPowerToSuperhero() public method

public AddPowerToSuperhero ( Superhero superhero, string powerName ) : void
superhero Superheroes.Models.Superhero
powerName string
return void

CreateSuperhero() public method

public CreateSuperhero ( string superheroName, string secretIdentity, string cityName ) : Superhero
superheroName string
secretIdentity string
cityName string
return Superheroes.Models.Superhero

CreateSuperhero() public method

public CreateSuperhero ( string superheroName, string secretIdentity, string cityName, IEnumerable powerNames ) : Superhero
superheroName string
secretIdentity string
cityName string
powerNames IEnumerable
return Superheroes.Models.Superhero

GetAllSuperheroes() public method

public GetAllSuperheroes ( ) : IQueryable
return IQueryable

GetSupeheroesWithPower() public method

public GetSupeheroesWithPower ( string powerName ) : IQueryable
powerName string
return IQueryable

SuperheroesService() public method

public SuperheroesService ( IUnitOfWork unitOfWork, IRepository superheroes, IRepository powers, IRepository cities ) : System
unitOfWork IUnitOfWork
superheroes IRepository
powers IRepository
cities IRepository
return System