public string Post([FromBody] Command command) { var json = command.ToString(); EventHandler eventHandler = new EventHandler(); IContext context = new EpidemyContext(json); EventHandlerContext eventHandlerContext = new EventHandlerContext(); eventHandlerContext.contextHandler = context; eventHandlerContext.command = EventHandlerFunctions.EpidemyAlertModule; eventHandlerContext.subModuleCommand = SubModuleFunctions.EpidemyCheckForAreas; eventHandler.InvokeCommand(eventHandlerContext); return(context.json); }
public String Post([FromBody] String disease) { EventHandler eventHandler = new EventHandler(); EpidemyContext context = new EpidemyContext(); context.specificSearch = disease; EventHandlerContext eventHandlerContext = new EventHandlerContext(); eventHandlerContext.contextHandler = context; eventHandlerContext.command = EventHandlerFunctions.EpidemyAlertModule; eventHandlerContext.subModuleCommand = SubModuleFunctions.EpidemyCheckForAlert; eventHandler.InvokeCommand(eventHandlerContext); return(context.json); }