ASP.net MVC Membership Authentication int, nvarchar or uniqueidentifier?

146 Views Asked by At

So I am new to MVC and I am struggling to create a Membership Authentication.

I a have a UserId table using as int, but what are the differences between nvarchar and int uniqueidentifier?

And what is the best option for UserId, Guid or Random? (let's say about 10 digits).

Thanks guys, Fernando.

1

There are 1 best solutions below

0
On

I'm sure that int is enough to store your users... unless you have more than 2,147,483,647 of them.

Int is faster than GUID and requires less space. it's also easier to read