Exemple #1
0
        public async Task <IActionResult> Create([Bind("Id,Name,DateTookOffice,Role,Pic,Party,VotingHistory")] Congressmembers congressmembers)
        {
            if (ModelState.IsValid)
            {
                _context.Add(congressmembers);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(congressmembers));
        }
        public async Task <IActionResult> Create([Bind("Id,LegalName,StreetName,ProposedBy,PassedHouse,PassedSenate,DateProposed,DatePassedFailed,RepSupport,DemSupport,IndSupport")] Bills bills)
        {
            if (ModelState.IsValid)
            {
                _context.Add(bills);
                await _context.SaveChangesAsync();

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