コード例 #1
0
        public List <Organisation> GetOrganisations()
        {
            var organisations = _context.Set <Organisation>()
                                .ToList();

            return(organisations);
        }
コード例 #2
0
        public List <OrganisationManager> getDeletedOrganisationManagers(bool deleted)
        {
            var orgmagr = _context.Set <OrganisationManager>()
                          .Where(x => x.isDeleted == deleted)
                          .ToList();

            return(orgmagr);
        }
コード例 #3
0
        public Department GetTop1Department(string dep, int orgId, bool del)
        {
            var department = _context.Set <Department>()
                             .Where(x => x.DepartmentName == dep && x.OrganisationID == orgId && x.isDeleted == del)
                             .ToList();

            return(department.LastOrDefault());
        }
コード例 #4
0
        public DepartmentManager GetSpecificDepartmentManager(int depid, int empId, bool del)
        {
            var depMan = _context.Set <DepartmentManager>()
                         .Where(x => x.DepartmentID == depid && x.ManagerID == empId && x.isDeleted == del)
                         .ToList();

            return(depMan.LastOrDefault());
        }
コード例 #5
0
        public UserAddress GetUserAddress(int userID)
        {
            var userAdd = _context.Set <UserAddress>()
                          .Where(x => x.UserID == userID)
                          .Include(c => c.EmplonomyUser)
                          .Include(c => c.AddressType)
                          .Include(c => c.City)
                          .Include(c => c.Town)
                          .Include(c => c.Province)
                          .Include(c => c.Country)
                          .FirstOrDefault();

            return(userAdd);
        }
コード例 #6
0
 public int CountAddressTypes()
 {
     return(_context.Set <AddressType>().Count());
 }
コード例 #7
0
 public int CountSendSmsStatuss()
 {
     return(_context.Set <SendSmsStatus>().Count());
 }
コード例 #8
0
        public List <T> FindMany(Expression <Func <T, bool> > predicate)
        {
            List <T> entities = _context.Set <T>().Where(predicate).ToList();

            return(entities);
        }
コード例 #9
0
 public int CountProvisioned()
 {
     return(_context.Set <Provisioned>().Count());
 }
コード例 #10
0
        public EmplonomyUser GetCompleteUserByEmail(string email)
        {
            var user = _context.Set <EmplonomyUser>()
                       .Where(x => x.EmailAddress == email && x.isDeleted == false)
                       .Include(d => d.Department)
                       .Include(p => p.PasswordQsBank)
                       .Include(sp => sp.SurveyResponses)
                       .Include(ua => ua.UserAddresses)
                       .Include(dm => dm.DepartmentManagers)
                       .Include(om => om.OrganisationManagers)
                       .FirstOrDefault();

            return(user);
        }
コード例 #11
0
 public int CountRoles()
 {
     return(_context.Set <Role>().Count());
 }
コード例 #12
0
 public int CountShortMessages()
 {
     return(_context.Set <ShortMessage>().Count());
 }
コード例 #13
0
 public int CountLocations()
 {
     return(_context.Set <Location>().Count());
 }
コード例 #14
0
 public int CountPasswordQsBanks()
 {
     return(_context.Set <PasswordQsBank>().Count());
 }