示例#1
0
        public IEnumerable <JobDTO> Get()
        {
            IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(jobRepos.GetJobs());

            if (oJob != null)
            {
                foreach (var item in oJob)
                {
                    item.Count = oJob.Count();
                }
            }
            return(oJob);
        }
示例#2
0
        public IEnumerable <JobDTO> GetJobsBySearch(string companyName, string jobTitle, string location, int?from, int?to)
        {
            int count = 0;
            var jobs  = jobRepos.GetJobsBySearch(companyName, jobTitle, location, from, to, out count);
            IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(jobs);

            if (oJob != null)
            {
                foreach (var item in oJob)
                {
                    var businessUsers = new BusinessUserMapBL().GetBusinessOwner(item.BusinessID).FirstOrDefault();
                    if (businessUsers != null)
                    {
                        item.Business.User = new UsersBL().Get(businessUsers.UserID);
                    }
                    item.Count = count;
                }
            }
            return(oJob);
        }
示例#3
0
        public IEnumerable <JobDTO> Get()
        {
            IEnumerable <JobDTO> oJob = JobAssembler.ToDTOs(oJobRepos.GetJobs());

            return(oJob);
        }