public ItemDetailViewModel(String barcode) { Item = DataStore.GetItemAsyncBarcode(barcode).ConfigureAwait(false).GetAwaiter().GetResult(); Title = Item?.Name; MotivationalText = MotivationalTextsRepository.GetRandomTextForWasteType(Item?.WasteType); }
public ItemDetailViewModel(Item item = null) { Title = item?.Name; Item = item; MotivationalText = MotivationalTextsRepository.GetRandomTextForWasteType(item?.WasteType); }