Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task<IActionResult> Index()
- {
- JObject clientInfo = getClientInformation();
- AuditLogging audit = new AuditLogging();
- audit.IPAddress = (string)clientInfo["IPv4"];
- audit.Location = (string)clientInfo["latitude"] + "," + (string)clientInfo["longitude"] + "," + (string)clientInfo["city"];
- audit.TimeOfAction = DateTime.Now;
- _context.Add(audit);
- await _context.SaveChangesAsync();
- // Return a message "Index0", To load _LoadChartIndex0 in /Elections
- ViewBag.message = "Index0";
- return View(await _context.Elections.ToListAsync());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement