public IActionResult GetLedgerAccounts()
        {
            var config        = mapping.GetMap <LedgerAccount, LedgerAccountViewModel>();
            var ledgerAccount = ledgerAccountService.GetAll().ProjectTo <LedgerAccountViewModel>(config).ToList();

            return(Json(new { data = ledgerAccount }));
        }
        public IActionResult GetUsers()
        {
            var config = mapping.GetMap <User, UserViewModel>();
            var user   = userService.GetAll().ProjectTo <UserViewModel>(config).ToList();

            return(Json(new { data = user }));
        }
Ejemplo n.º 3
0
        public IActionResult GetMenus()
        {
            var config = mapping.GetMap <Menu, MenuViewModel>();
            var menu   = menuService.GetAll().ProjectTo <MenuViewModel>(config).ToList();

            return(Json(new { data = menu }));
        }
        public IActionResult GetRoles()
        {
            var config = mapping.GetMap <Role, RoleViewModel>();
            var role   = roleService.GetAll().ProjectTo <RoleViewModel>(config).ToList();

            return(Json(new { data = role }));
        }
        public IActionResult GetAppSettings()
        {
            var config     = mapping.GetMap <AppSetting, AppSettingViewModel>();
            var appSetting = appSettingService.GetAll().ProjectTo <AppSettingViewModel>(config).ToList();

            return(Json(new { data = appSetting }));
        }