public ActionResult Create() { var list = _contactTypeService.GetAll().Items; this.ViewBag.ContactTypeId = new SelectList(list, "Id", "Description"); return(View()); }
// GET: Reservations/Create public ActionResult Create(int?page, string sort) { this.ViewBag.page = page ?? 1; this.ViewBag.sort = sort; var list = _contactTypeService.GetAll().Items; this.ViewBag.ContactTypeId = new SelectList(list, "Id", "Description"); var reservationDto = new ReservationViewModel(); return(View(reservationDto)); }
// GET: Employee/Create public ActionResult Create() { var ContactTypes = _ContactTypeService.GetAll(); ViewBag.ContactTypes = ContactTypes.Select(a => new SelectListItem { Text = a.ContactType, Value = a.Name.ToString() }).AsEnumerable().ToList(); var Tags = _TagService.GetAll(); ViewBag.Tags = Tags.Select(a => new SelectListItem { Text = a.TagName, Value = a.Id.ToString() }).AsEnumerable().ToList(); return(View()); }
public IActionResult GetAll() { return(Ok(_service.GetAll())); }
public IEnumerable <ContactTypeDTO> GetAll() { return(_service.GetAll()); }