/// <summary> /// Loading data for the creation page (get-method) /// </summary> /// <returns>View</returns> public IActionResult Create() { ViewData["GuestsId"] = new MultiSelectList( _userStorage.GetFullList() .Where(rec => rec.Email != User.Identity.Name) .ToList(), "Id", "Email"); return(View()); }
public List <UserViewModel> Read(UserBindingModel model) { if (model == null) { return(userStorage.GetFullList()); } return(new List <UserViewModel> { userStorage.GetElement(model) }); }
public List <UserViewModel> Read(UserBindingModel model) { if (model == null) { return(_userStorage.GetFullList()); } if (model.Id.HasValue) { return(new List <UserViewModel> { _userStorage.GetElement(model) }); } return(_userStorage.GetFilteredList(model)); }