public IActionResult Login(string returnUrl) { var setting = _appSettingService.GetAll().Select(i => new { i.LoginPageBackground }); ViewBag.LoginPageBackground = setting.Select(i => i.LoginPageBackground).FirstOrDefault(); return(View(new LoginViewModel { ReturnUrl = returnUrl })); }
public IActionResult GetAppSettings() { var config = mapping.GetMap <AppSetting, AppSettingViewModel>(); var appSetting = appSettingService.GetAll().ProjectTo <AppSettingViewModel>(config).ToList(); return(Json(new { data = appSetting })); }
public IActionResult Index() { DashboardViewModel homeVM = new DashboardViewModel(); homeVM.User = _userService.GetAll().Count(); homeVM.Role = _roleService.GetAll().Count(); homeVM.Menu = _menuService.GetAll().Count(); homeVM.AppSetting = _appSettingService.GetAll().Count(); homeVM.GeneralSetting = _generalSettingService.GetAll().Count(); homeVM.Notification = _notificationService.GetAll().Count(); homeVM.MenuPermission = _menuPermissionService.GetAll().Count(); homeVM.RoleUser = _roleUserService.GetAll().Sum(i => i.Id); return(View(homeVM)); }