Пример #1
0
        public List <SearchJobListViewModel> NasscomJobs()
        {
            DataTable dt = _homeRepositories.NasscomJobsList();
            List <SearchJobListViewModel> list = new List <SearchJobListViewModel>();

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    SearchJobListViewModel model = new SearchJobListViewModel
                    {
                        CompanyLogo      = Convert.ToString(dt.Rows[i]["CompanyLogo"]),
                        CompanyName      = Convert.ToString(dt.Rows[i]["CompanyName"]),
                        JobPostId        = Convert.ToInt32(dt.Rows[i]["JobPostId"]),
                        JobTitle         = Convert.ToString(dt.Rows[i]["JobTitle"]),
                        City             = Convert.ToString(dt.Rows[i]["City"]),
                        EmploymentStatus = Convert.ToString(dt.Rows[i]["EmploymentStatus"]),
                    };
                    list.Add(model);
                }
            }
            return(list);
        }