public UserProfileCollection FetchAll() { UserProfileCollection coll = new UserProfileCollection(); Query qry = new Query(UserProfile.Schema); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public List <ProfileShortInfoVM> GetAllUserProfileShortInfo() { var result = new List <ProfileShortInfoVM>(); if (UserProfileCollection.Any()) { foreach (var item in UserProfileCollection) { result.Add(new ProfileShortInfoVM(item)); } } return(result); }
public List <ProfileUpdateInfoVM> GetAllUserProfileUpdateInfo() { var result = new List <ProfileUpdateInfoVM>(); if (UserProfileCollection.Any()) { foreach (var item in UserProfileCollection) { //result.Add(new ProfileUpdateInfoVM(item)); result.Add(ServiceAutoMapModelMapper.CreateProfileUpdateInfoVM(item)); } } return(result); }
/// <summary> /// Loads a collection of UserProfile objects from the database. /// </summary> /// <returns>A collection containing all of the UserProfile objects in the database.</returns> public static UserProfileCollection LoadCollection(string spName, SqlParameter[] parms) { UserProfileCollection result = new UserProfileCollection(); using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms)) { while (reader.Read()) { UserProfile tmp = new UserProfile(); tmp.LoadFromReader(reader); result.Add(tmp); } } return(result); }
public UserProfileCollection FetchByQuery(Query qry) { UserProfileCollection coll = new UserProfileCollection(); coll.LoadAndCloseReader(qry.ExecuteReader()); return coll; }
public UserProfileCollection FetchByID(object Id) { UserProfileCollection coll = new UserProfileCollection().Where("ID", Id).Load(); return coll; }