Exemple #1
0
        public MeGrabUserDataObject GetRegisteredUserById(int id)
        {
            MeGrabUser registeredUser = userRepository.FindByKey(id);

            if (registeredUser == null)
            {
                return(null);
            }

            MeGrabUserDataObject registeredUserDataObject = new MeGrabUserDataObject();

            registeredUserDataObject.MapFrom(registeredUser);

            return(registeredUserDataObject);
        }
Exemple #2
0
        public MeGrabUserDataObject GetRegisteredUserByName(string name)
        {
            ISpecification <MeGrabUser> spec = new ExpressionSpecification <MeGrabUser>(u => u.Name == name);

            MeGrabUser registeredUser = userRepository.Find(spec);

            if (registeredUser == null)
            {
                return(null);
            }

            MeGrabUserDataObject registeredUserDataObject = new MeGrabUserDataObject();

            registeredUserDataObject.MapFrom(registeredUser);

            return(registeredUserDataObject);
        }