public RequirementSubTypeController( IRequirementSubTypeService service, IRequirementTypeService type) : base(service) { this.service = service; ViewData.Add("RequirementTypeID", new SelectList(type.getAll(), "RequirementTypeID", "description")); }
public RequirementTemplateController (IRequirementTemplateService service, IUserService userService, IRequirementTypeService type) : base(service) { this.service = service; Mapper.Initialize(cfg => { cfg.CreateAutomaticMapping <RequirementTemplateViewModel, RequirementTemplateEntity>(); cfg.CreateAutomaticMapping <RequirementTemplateEntity, RequirementTemplateViewModel>(); }); ViewData.Add("CreationUserID", new SelectList(userService.getAll(), "UserID", "DisplayName")); ViewData.Add("RequirementTypeID", new SelectList(type.getAll(), "RequirementTypeID", "description")); }