示例#1
0
        public void Handle(LogInCommand command)
        {
            using (var dbContext = new UserAccountDataContext())
            {
                User user = dbContext.Users.SingleOrDefault(u => u.Login == command.Login);
                ValidateLoginData(user, command);

                var appUser = CreateAppUserEntity(user);
                CookieHandler.Create(appUser, command.RememberMe);
            }
        }