/// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public ApplicationCreateViewModel GetCreate()
        {
            ApplicationCreateViewModel vm = new ApplicationCreateViewModel();
            vm.Users = _userRepository
                .All()
                .ToList()
                .Select(e => new SelectListItem { Text = e.Name, Value = e.PK_ID.ToString() })
                .WithEmptyItem("Select developer")
                .ToList();

            IEnumerable<SRREntityTagKeywords> tags = _tagRepository.All().ToList();
            vm.Tags = new MultiSelectList(tags, "PK_ID", "Name");

            return vm;
        }
 public void PostCreate(ApplicationCreateViewModel createVM)
 {
     createVM.Application.AttachedObjects = "alma";
     if (createVM.SelectedTags != null && createVM.SelectedTags.Count() != 0)
     {
         var res = _tagRepository.Find(p => createVM.SelectedTags.Cast<int>().Contains(p.PK_ID));
         if (res.Any())
         {
             createVM.Application.Tags.Clear();
             foreach (var tag in res)
             {
                 createVM.Application.Tags.Add(tag);
             }
         }
     }
     _appRepository.Add(createVM.Application);
     _appRepository.Save();
 }
 public ActionResult Create(ApplicationCreateViewModel app)
 {
     this._appManager.PostCreate(app);
     return RedirectToAction("Index");
 }