public ActionResult <SelectionDTO> MakeSelection([FromBody] IdsDTO dto) { var selection = _selectionService.CreateSelection(dto.Ids); var selectionDTO = new SelectionDTO(selection.Id); return(CreatedAtAction(nameof(GetSelection), new { id = selection.Id }, selectionDTO)); }
public SelectionDTO GetAll() { selectionDTO = new SelectionDTO { Sex = DALFacade.GetSexRepository().GetAll(), ClubMember = DALFacade.GetClubMemberRepository().GetAll(), Movie = DALFacade.GetMovieRepository().GetAll(), Genre = DALFacade.GetGenreRepository().GetAll() }; return(selectionDTO); }
public ActionResult Edit(SelectionViewModel model) { SelectionDTO selectionDTO = new SelectionDTO { Id = model.Id, Name = model.Name.Trim(), EducationId = model.EducationId, ExperienceId = model.ExperienceId, TrainingId = model.TrainingId, CertificationTestId = model.CertificationTestId, SportProgrammingId = model.SportProgrammingId }; selectionService.Update(selectionDTO); return(RedirectToAction("Index")); }
public ActionResult Create(SelectionViewModel model) { if (model != null) { SelectionDTO selectionDTO = new SelectionDTO { Name = model.Name.Trim(), EducationId = model.EducationId, ExperienceId = model.ExperienceId, TrainingId = model.TrainingId, CertificationTestId = model.CertificationTestId, SportProgrammingId = model.SportProgrammingId }; selectionService.Create(selectionDTO); ModelState.Clear(); return(RedirectToAction("Index")); } return(View(model)); }
public SelectionWorkflow(SelectionDTO selectionDTO) { this.selectionDTO = selectionDTO; }