public SessionClassController(ISessionClassService SessionClassService, ISessionTopicService SessionTopicService, ISessionRoomService SessionRoomService) { _SessionClassService = SessionClassService; _SessionTopicService = SessionTopicService; _SessionRoomService = SessionRoomService; var topics = _SessionTopicService.GetAll(); foreach (var t in topics) { topicItems.Add(new SelectListItem() { Text = t.Name, Value = t.Id.ToString() }); } ViewBag.topicItems = topicItems; var rooms = _SessionRoomService.GetAll(); foreach (var t in rooms) { roomItems.Add(new SelectListItem() { Text = t.Name, Value = t.Id.ToString() }); } ViewBag.roomItems = roomItems; }
public void Initialize() { _mockRepository = new Mock <ISessionTopicRepository>(); _mockUnitWork = new Mock <IUnitOfWork>(); _service = new SessionTopicService(_mockUnitWork.Object, _mockRepository.Object); listSessionTopics = new List <SessionTopic>() { new SessionTopic() { Name = "XML" }, new SessionTopic() { Name = "HTML" }, new SessionTopic() { Name = "JavaScript" } }; }
public SessionTopicController(ISessionTopicService SessionTopicService) { _SessionTopicService = SessionTopicService; }