Inheritance: Zen.DataStore.HasGuidId
Exemplo n.º 1
0
        public string Hello(string name)
        {
            var userProfile = _userRepository.Query.FirstOrDefault(i => i.UserName == name);
            if (userProfile == null)
            {
                userProfile = new UserQueryCount()
                    {
                        Count = 1,
                        UserName = name
                    };
                _userRepository.Store(userProfile);
            }
            else
            {
                userProfile.Count++;
            }
            _userRepository.SaveChanges();

            return string.Format("{0}] Hello {1} count: {2}", DateTime.Now, name, userProfile.Count);
        }
Exemplo n.º 2
0
        public string Hello(string name)
        {
            var userProfile = _userRepository.Query.FirstOrDefault(i => i.UserName == name);

            if (userProfile == null)
            {
                userProfile = new UserQueryCount()
                {
                    Count    = 1,
                    UserName = name
                };
                _userRepository.Store(userProfile);
            }
            else
            {
                userProfile.Count++;
            }
            _userRepository.SaveChanges();

            return(string.Format("{0}] Hello {1} count: {2}", DateTime.Now, name, userProfile.Count));
        }