コード例 #1
0
        public async Task <ActionResult> Contact()
        {
            CompanyListDto info = await _companyAppService.GetDefaultCompanyAsync();

            ViewBag.SeoSetting = GetSeoSetting();

            return(View(info));
        }
コード例 #2
0
        public ActionResult Index()
        {
            CompanyListDto info = _companyAppService.GetDefaultCompanyAsync().Result;

            ViewBag.SeoSetting = GetSeoSetting();

            return(View(info));
        }
コード例 #3
0
        public async Task <ActionResult> Index()
        {
            GetBannerInput bannerInput = new GetBannerInput()
            {
                FilterText     = "",
                MaxResultCount = CarFactoryConsts.MaxPageSize,
                SkipCount      = 0,
                Sorting        = "Sort"
            };

            ViewBag.BannerList = await _bannerAppService.GetPagedBannersAsync(bannerInput);

            CompanyListDto info = await _companyAppService.GetDefaultCompanyAsync();

            ViewBag.SeoSetting = GetSeoSetting();
            return(View(info));
        }
コード例 #4
0
        public async void ShouldGetCompanies()
        {
            var company = new CompanyListDto()
            {
                Id = 100, Description = "Test List"
            };
            var otherCompany = new CompanyListDto()
            {
                Id = 200, Description = "Test list 2"
            };


            _context.Company.Add(_mapper.Map <Company>(company));
            _context.Company.Add(_mapper.Map <Company>(otherCompany));
            await _context.SaveChangesAsync();

            var result = "";

            //Act
            //result = _service.GetCompaniesAsync();
            //Assert
            result.Should().NotBeNull();
        }