public MemberStrategy() { //不確定是Member還是Coach K:repository型別 memberRepository = GenericFactory.CreateInastance <IMemberRepository <Member> >(typeof(MemberRepository)); }
public CoachStrategy() { Repository = GenericFactory.CreateInastance <ICoachRepository <Coach> >(typeof(CoachRepository)); }
public ReserveFacade() { repository = GenericFactory.CreateInastance <IReserveRepository>(typeof(ReserveRepository)); }
public MemberService() { //透過工廠建立實體 _repository = GenericFactory.CreateInastance <IRepository <Human> >(typeof(GenericRepository <Human>)); }
public TdeeStrategy(double deduct) { _calculate = GenericFactory.CreateInastance <ICalculate>(typeof(CalculateService), new object[] { deduct }); }
public SearchFacade() { repository = GenericFactory.CreateInastance <ISearchRepository>(typeof(SearchRepository)); }
public NutritionService() { _repository = GenericFactory.CreateInastance <IRepository <Nutrition> >(typeof(GenericRepository <Nutrition>)); }
public MemberApiController() { _memberservice = GenericFactory.CreateInastance <IMemberService>(typeof(MemberService)); _nutritionservice = GenericFactory.CreateInastance <INutritionService>(typeof(NutritionService)); }