よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
よく使われるメソッド
public ActionResult DisplayAds(string viewName = "DisplayAds_Bottom") { var isUserLoggedIn = Request.IsAuthenticated; var isUserCompany = User.IsInRole(Constants.CompanyRole); var companyId = -1; if (isUserLoggedIn && isUserCompany) { companyId = CurrentUserCompanyId; } ViewBag.Ads = Mapper.Map <IEnumerable <DisplayAdViewModel> >(_adsService.DisplayAds(12, companyId)); return(PartialView(viewName)); }