public ServiceCreateViewModel GetCreate()
        {
            ServiceCreateViewModel vm = new ServiceCreateViewModel();
            vm.UserList = _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.TagList = new MultiSelectList(tags, "PK_ID", "Name");

            return vm;
        }
 public void PostCreate(ServiceCreateViewModel 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.CurrentServiceObject.Tags.Clear();
             foreach (var tag in res)
             {
                 createVM.CurrentServiceObject.Tags.Add(tag);
             }
         }
     }
     _serviceRepository.Add(createVM.CurrentServiceObject);
     _serviceRepository.Save();
 }
 public ActionResult Create(ServiceCreateViewModel app)
 {
     this._serviceManager.PostCreate(app);
     return RedirectToAction("Index");
 }