public async Task <IActionResult> Create([Bind("RoleId,Role,Active,Discription,CreatedBy,CreatedDate")] TblRole tblRole) { if (ModelState.IsValid) { db.Add(tblRole); await db.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblRole)); }
public async Task <IActionResult> Create([Bind("UserId,Username,Password,Lock,RoleId,CreatedBy,CreatedDate")] TblUser tblUser) { if (ModelState.IsValid) { db.Add(tblUser); await db.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblUser)); }