// GET: Home public ActionResult Index() { UserContact dynamics = new UserContact(); FeaturesService _featuresService = new FeaturesService(); WorksService _worksService = new WorksService(); BannerService _bannerService = new BannerService(); dynamics.Features = _featuresService.GetFeatures().ToList(); dynamics.Works = _worksService.GetWorks().ToList(); dynamics.Banner = _bannerService.BannerGet(5); TempData["BannerTitle"] = dynamics.Banner.Title; TempData["BannerD"] = dynamics.Banner.Description; return(View(dynamics)); }
public AdminController() { IdentityContext db = new IdentityContext(); UserStore <AppUser> userStore = new UserStore <AppUser>(db);//bir identity tablosu user ile ilgili işlemler userManager = new UserManager <AppUser>(userStore); RoleStore <AppRole> roleStore = new RoleStore <AppRole>(db); roleManager = new RoleManager <AppRole>(roleStore); _featuresService = new FeaturesService(); _bannerService = new BannerService(); _worksService = new WorksService(); _planService = new PlanService(); _contactService = new ContactService(); _companyService = new CompanyService(); }