public async Task <ActionResult> Create(FormCollection collection)
        {
            try
            {
                //trebam dodati i ostale podatke ako unosi klijenta u moju bazu!!!!  ->admin unosi ADMINe i TRENERe
                string roleId   = collection["RoleId"];
                string email    = collection["Email"];
                string password = collection["Password"];

                string userName             = email;
                string roleName             = collection["Name"]; //ne trebam
                bool   emailConfirmed       = false;
                bool   phoneNumberConfirmed = false;
                bool   twoFactorEnabled     = false;
                bool   lockoutEnabled       = false;
                int    accesFailedCount     = 0;
                //ovo gore dobro pokupi i sada trebam da ovog klijenta posaljem da kreira Identity i onda taj vraceni ID->upisem tog korisnika!!!
                await userRoleDAO.Create(roleId, email, userName, password, roleName, emailConfirmed, phoneNumberConfirmed, twoFactorEnabled, lockoutEnabled, accesFailedCount);

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View("Error"));
            }
        }
Ejemplo n.º 2
0
 public int Create(UserRole userRole)
 {
     return(_userroledao.Create(userRole));
 }