Most voted "guid" questions
A GUID is a Global Unique Identifier, is a special type of identifier used in software applications to provide a reference number that will be unique in any context like, for example, in an internal reference definition for a type of access point in a software application or for creating unique keys in a database. If the doubt is not about "GUID", do not use this tag.
Learn more…8 questions
Sort by count of
-
29
votes3
answers8073
viewsHow is the Global Unique Identifier (GUID) generated?
The Global Unique Identifier is generated so that no other will be generated equal, or will almost never have the same number. var unique = Guid.NewGuid().ToString(); Resultado:…
-
21
votes5
answers6769
viewsShould I use GUID or int as the primary key?
I’m about to start a new project in MVC 4 with Entity Framework, searching I found several examples here in Sopt of models that use GUID as ID and some doubts have arisen me: What is the advantage…
-
16
votes3
answers4284
viewsWhat is the probability of generating a Repeated Guid?
What is the probability of generating a Repeated Guid with Guid.NewGuid()? I am uploading numerous images from my system. The same will be a Multitenancy, and will share the same Deploy, from the…
-
7
votes1
answer177
viewsGuid.Parse() or new Guid()?
What’s the main difference between using the options Guid.Parse() or new Guid() to convert a string in a Guid? And which of the two approaches would be best used? var usuarioId = new…
-
4
votes1
answer117
viewsIs it bad practice to use "Guid" and "int" for the same bank?
In a project I’m developing I prioritize the use of Guid for PK because of the ease for me, but it has a table that would be more advantageous to use int. This is wrong?…
-
3
votes1
answer109
viewsIs it feasible to migrate from long to Guid?
Using Webapi, . NET Standard, C#, Entity Framework - Codefirst The records in long may exceed their limits. It is feasible to change long for Guid the primary key with the populated bank and running…
-
2
votes1
answer237
viewsWhat is Guidattribute for and why?
I know the GUID is a 'unique' identifier, but I don’t see why your attribute application, as in the example below: [GuidAttribute("C281C7F1-4AA9-3517-961A-463CFED57E75")]…
-
1
votes2
answers777
viewsC# Regular expression for string and Guid validation
(1). I would like to validate a string by checking that it only has {[a-z], [A-Z], [0-9], '-'} if(minhaString.ContemApenas({[a-z], [A-Z], [0-9], '-'}) == true) { // Minha string é válida! } (2). I…