internal NodeCertificate Save(NodeCertificate cert) { cert.Id = IdManager.GetId(); using (dbc = DAL.Instance.GetDb()) dbc.Insert(cert); return(cert); }
private PeerNode CreateNewNode(string ip, NodeCertificate cert) { var node = new PeerNode(); node.Name = Dns.GetHostEntry(ip).HostName; node.IP = ip; node.Locked = true; node.Status = NodeStatus.New; node = new DAL.NodeDAO().Save(node); cert.NodeId = node.Id; cert = new DAL.CertificateDAO().Save(cert); Logger.Append("HUBRN", Severity.INFO, "Created new node #" + node.Id + " with cert #" + cert.Id + " for client " + ip); return(node); }