public IController CreateController(RequestContext requestContext, string controllerName) { var defaultFactory = new DefaultControllerFactory(); if (controllerName.ToLower().StartsWith("proteintracker")) { var repository = new ProteinRepository("yoo"); var service = new ProteinTrackingService(repository); var controller = new ProteinTrackerController(service); return(controller); } return(defaultFactory.CreateController(requestContext, controllerName)); }
public ProteinController() { _proteinRepository = new ProteinRepository(); }