/* ========================================= */ /* QUERY HANDLERS */ /* ========================================= */ /* Add new instrument */ public IActionResult addInstrument(string instrumentname, string instrumentaddress) { if (!(instrumentaddress == null || instrumentname == null)) { modelInstruments newinstrument = new modelInstruments() { name = instrumentname, localAddress = instrumentaddress, status = "OFFLINE" }; _context.addEntry(newinstrument); } return(PartialView("_PartialInstruments")); }
public void populatecred() { modelCredentials cred = new modelCredentials() { email = "admin@admin", password = _context.computeHash("alpine"), sysadmin = true }; modelInstruments ins = new modelInstruments() { name = "NUGGET_TEST", localAddress = "192.168.6.23:5000", status = "OFFLINE" }; _context.addEntry(cred); _context.addEntry(ins); }