예제 #1
0
        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);
        }
예제 #2
0
        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);
        }