/// <summary> /// Initializes a new instance of the <see cref="DbLogic"/> class. /// Sets the intial values of the properties. /// </summary> /// <param name="model">Initial GameModel.</param> /// <param name="drillRepo">Initial DrillRepository.</param> /// <param name="brickRepo">Initial BrickRepository.</param> /// <param name="connRepo">Initial ConnRepository.</param> public DbLogic(GameModel model, IDrillRepository drillRepo, IBrickRepository brickRepo, IConnRepository connRepo) { this.gameModel = model; this.drillRepo = drillRepo; this.brickRepo = brickRepo; this.connRepo = connRepo; }
public static async Task <IEnumerable <Drill> > GetCategoryOrFailAsync(this IDrillRepository repository, string category) { var drills = await repository.GetAllByCategoryAsync(category); if (drills == null) { throw new Exception($"Drill with category: '{category}' was not found"); } return(drills); }
public DrillsController(IDrillRepository drillRepository) { this.drillRepository = drillRepository; }
public DrillsController(IDrillRepository drillRepository) { this.drillRepository = drillRepository; }
public DrillsApi(IDrillRepository drillRepository) { this.drillRepository = drillRepository; }
public DrillService(IDrillRepository drillRepository, IMapper mapper) { _drillRepository = drillRepository; _mapper = mapper; }