Skip to content

Instantly share code, notes, and snippets.

@FraukeN
Last active June 15, 2018 22:15
Show Gist options
  • Save FraukeN/baaa1507b90162ec57ac6971016f5c44 to your computer and use it in GitHub Desktop.
Save FraukeN/baaa1507b90162ec57ac6971016f5c44 to your computer and use it in GitHub Desktop.
OverviewVM with ViewModelBase
public class OverviewVM : ViewModelBase
{
private MockRepository _toDoRepo;
private IEnumerable<ToDoItem> _toDoItems;
public IEnumerable<ToDoItem> ToDoItems
{
get { return _toDoItems; }
set { Set(ref _toDoItems, value); }
}
public OverviewVM()
{
_toDoRepo = new MockRepository();
}
public async Task LoadData()
{
ToDoItems = await _toDoRepo.GetAsync();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment