public SearchViewModel(IPageService pageService, IGuitarService guitarService) { _guitarService = guitarService ?? throw new ArgumentNullException(nameof(guitarService)); _pageService = pageService; SearchCommand = new Command <string>((string queryText) => SearchGuitars(queryText)); GetGuitars(); }
public GuitarsViewModel(IPageService pageService, IGuitarService guitarService) { _guitarService = guitarService ?? throw new ArgumentNullException(nameof(guitarService)); _pageService = pageService; Guitars = new ObservableCollection <Guitar>(); SelectedGuitarCommand = new Command(async() => await SelectGuitar()); SearchCommand = new Command <string>((string queryText) => SearchGuitars(queryText)); TextChangedCommand = new Command(() => TextChanged()); GetGuitars(); }
private IGuitarService GuitarService; // = new GuitarService(); #endregion Fields #region Constructors //Agregando el Dependency Injection //-------------------------------------------------------- public GuitarController(IGuitarService GuitarService) { this.GuitarService = GuitarService; }
private IGuitarService GuitarService; // = new GuitarService(); #endregion Fields #region Constructors //Agregando el Dependency Injection //-------------------------------------------------------- public ProjectController(IGuitarService GuitarService) { this.GuitarService = GuitarService; }
public IGuitar StandardTunning([FromServices] IGuitarService s, int fretCount) => s.StandardTuning(fretCount);
public IGuitar StandardTuning([FromServices] IGuitarService s) => s.StandardTuning();