Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OverviewVM(IRepository<ToDoItem> toDoRepo)
- {
- _toDoRepo = toDoRepo ?? throw new ArgumentNullException("toDoRepo");
- IsFaulted = false;
- ErrorMessage = string.Empty;
- }
- public async Task LoadData()
- {
- try
- {
- ToDoItems = await _toDoRepo.GetAsync();
- IsFaulted = false;
- ErrorMessage = string.Empty;
- }
- catch (Exception)
- {
- IsFaulted = true;
- ErrorMessage = "Unable to Load ToDo Items";
- }
- }
Add Comment
Please, Sign In to add comment