private IPtoDNS GetOrCreateIP(string ipaddress) { loggingDataContext db = new loggingDataContext(); IPtoDNS ipdetails = db.IPtoDNS.Where(x => x.ipaddress.Equals(ipaddress.Trim())).FirstOrDefault(); if (ipdetails == null || ipdetails.ID == 0) { ipdetails = new IPtoDNS { ipaddress = ipaddress.Trim(), dateChecked = DateTime.Now }; db.IPtoDNS.InsertOnSubmit(ipdetails); db.SubmitChanges(); ipdetails.LookupAsync(); } return ipdetails; }
partial void DeleteIPtoDNS(IPtoDNS instance);
partial void UpdateIPtoDNS(IPtoDNS instance);
partial void InsertIPtoDNS(IPtoDNS instance);