private IList <UserModel> PopulateUser(DataSet ds) { var models = new List <UserModel>(); if (ds != null) { foreach (DataRow rowItem in ds.Tables[0].Rows) { var model = new UserModel(); model.UserName = rowItem["UserName"].ToString(); model.Id = int.Parse(rowItem["Id"].ToString()); model.Password = rowItem["Password"].ToString(); model.DateCreated = DateTime.Parse(rowItem["DateCreated"].ToString()); model.DateUpdated = DateTime.Parse(rowItem["DateUpdated"].ToString()); model = DataStorageService.GetUserRoles(model); model = DataStorageService.GetUserRoleGroups(model); models.Add(model); } } return(models); }