Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Identifying an object using guids

$
0
0

Really new to development, I've built an application where I handle all the user registration, so the user doesn't actually get to register themselves..I do it for them and then give them the login details.

I can get the listing of all users okay, but I can't use the details, edit or delete actions because I don't know how to identify the GUID in the controller.  

Normally I would expect to identify by doing this:

public ActionResult Details(int UserId=0)
{

return View(db.Consultants.Find(UserId));
}

but seeing as though the db works with Guids and the UserId is nvarchar, I'm at a loss.

Can anyone please help me?


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>