public void Update() { Categories.Clear(); using (ICategoryController controller = factory.CreateCategoryController()) { DataControllerMessage <IEnumerable <CategoryDisplayDTO> > controllerMessage = controller.GetAll(); if (controllerMessage.IsSuccess) { foreach (CategoryDisplayDTO category in controllerMessage.Data) { Categories.Add(category); } } } }