public BackendMenuGroupViewModel Build(BackendMenuGroup backendMenuGroup)
 {
     return new BackendMenuGroupViewModel()
       {
     Name = backendMenuGroup.Name,
     Position = backendMenuGroup.Position
       };
 }
Exemple #2
0
        private BackendMenuGroupViewModel GetBackendMenuGroup(List <BackendMenuGroupViewModel> backendMenuGroupViewModels, Platformus.Infrastructure.BackendMenuGroup backendMenuGroup)
        {
            BackendMenuGroupViewModel backendMenuGroupViewModel = backendMenuGroupViewModels.FirstOrDefault(bmg => bmg.Name == backendMenuGroup.Name);

            if (backendMenuGroupViewModel == null)
            {
                backendMenuGroupViewModel = new BackendMenuGroupViewModelFactory(this.RequestHandler).Create(backendMenuGroup);
                backendMenuGroupViewModels.Add(backendMenuGroupViewModel);
            }

            return(backendMenuGroupViewModel);
        }