Beispiel #1
0
        public static List <UserAccountModel> FindUnmatchedBigs()
        {
            using (var _context = new bbbsDbContext())
            {
                var matchedBigUserAccounts = (from ua in _context.UserAccounts
                                              join blpm in _context.BigLittleParentMaps on ua.Id equals blpm.BigId
                                              select ua).Distinct().ToList();

                var unmatchedBigUserAccounts = (from ua in _context.UserAccounts
                                                where !matchedBigUserAccounts.Contains(ua) && ua.UserTypeId == 1
                                                select ua).Distinct().ToList();

                var unmatchedBigUserAccountModels = TransformHelpers.ListUserAccountToModel(unmatchedBigUserAccounts);

                return(unmatchedBigUserAccountModels);
            }
        }