public void Intercept(IInvocation invocation) { var watch = new Stopwatch(); watch.Start(); invocation.Proceed(); watch.Stop(); var newEventLog = new Entities.EventLog { EventCallerName = invocation.Request.Method.Name, EventDate = DateTime.Now, EventDuration = watch.ElapsedMilliseconds.ToString(), Description = invocation.Request.Method.ToString() }; _eventLogService.Add(newEventLog); }
public ActionResult Create(EventLog eventLog) { var result = _eventLogService.Add(eventLog); return(View(result)); }