public void AsynchLogUserAuthentification(string userName, string ip, bool status) { var userAuthentificationLog = new UserAuthentificationLog { UserName = userName, IpAddress = ip, Status = status, DateTime = DateTime.Now }; AsynchDelegate aDelegate = () => { DataService.PerThread.UserAuthentificationLogSet.AddObject(userAuthentificationLog); DataService.PerThread.SaveChanges(); }; var asynchRes = aDelegate.BeginInvoke(null, null); aDelegate.EndInvoke(asynchRes); }
public void AsynchLogUserAuthentification(string userName, string ip, bool status) { var userAuthentificationLog = new UserAuthentificationLog { UserName = userName, IpAddress = ip, Status = status, DateTime = DateTime.Now }; AsynchDelegate aDelegate = () => { DataService.PerThread.UserAuthentificationLogSet.AddObject(userAuthentificationLog); DataService.PerThread.SaveChanges(); }; var asynchRes = aDelegate.BeginInvoke(null, null); aDelegate.EndInvoke(asynchRes); }