public async Task <IActionResult> Create([Bind("Id,UswerId,date,DocId,Institution,IsDiagnosed,Problem,Comment")] UserDetails userDetails) { if (ModelState.IsValid) { _context.Add(userDetails); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(userDetails)); }
public async Task <IActionResult> Create([Bind("id,Role")] roles roles) { if (ModelState.IsValid) { _context.Add(roles); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(roles)); }
public async Task <IActionResult> Create([Bind("Id,fULL_NAME,uSERNAME,ROLE,PHONE,serviceNo,PASSWORD")] Doc_Res doc_Res) { if (ModelState.IsValid) { _context.Add(doc_Res); await _context.SaveChangesAsync(); return(RedirectToAction("Index", "Home")); } return(View(doc_Res)); }