예제 #1
0
        public IList <Profile> GetAll()
        {
            IList <Profile> galleries = new List <Profile>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Profile_Get())
                {
                    int total;
                    FillProfileCollection(reader, galleries, 0, Int32.MaxValue, out total);
                }
            }

            return(galleries);
        }
예제 #2
0
        public Profile GetProfile(int profileID)
        {
            IList <Profile> galleries = new List <Profile>();

            using (SprocWrapper db = new SprocWrapper())
            {
                using (IDataReader reader = db.Profile_Get(profileID))
                {
                    int total;
                    FillProfileCollection(reader, galleries, 0, Int32.MaxValue, out total);
                }
            }

            if (galleries.Count == 1)
            {
                return(galleries[0]);
            }
            else
            {
                return(null);
            }
        }