コード例 #1
0
        public ActionResult Add()
        {
            AddAdvertisementVM model = new AddAdvertisementVM()
            {
                appUsers       = _appUserService.GetActive(),
                Cities         = _cityService.GetActive(),
                Districts      = _districtService.GetActive(),
                Pettypes       = _pettypeService.GetActive(),
                Races          = _raceService.GetActive(),
                advertisements = _advertisementService.GetActive(),
            };

            return(View(model));
        }
コード例 #2
0
        // GET: Admin/Home
        public ActionResult Index()
        {
            AdvertisementService _advertisementService = new AdvertisementService();
            var model = _advertisementService.GetActive().OrderByDescending(x => x.CreatedDate).Take(5);

            return(View(model));
        }