Ejemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("ApplicationId,UserName,FullName")] User user)
        {
            if (ModelState.IsValid)
            {
                user.Deleted = false;
                _context.Add(user);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new { appId = user.ApplicationId }));
            }
            return(View(User));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ApplicationId,Name,Description")] Role role)
        {
            if (ModelState.IsValid)
            {
                role.Deleted = false;
                _context.Add(role);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index), new { appId = role.ApplicationId }));
            }
            return(View(role));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("Name,Description")] Application application)
        {
            if (ModelState.IsValid)
            {
                application.Deleted = false;
                _context.Add(application);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(application));
        }