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); }
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); } }