Questions tagged as 'guid'

4
answers

Should I use GUID or int as a primary key?

I'm about to start a new project in MVC 4 with Entity Framework, searching I found several examples here in the SOpt of models that use GUID as ID and some doubts have arisen: What is the advantage of using GUID as a primary key? Is it feas...
asked by 19.06.2014 / 21:38
3
answers

How likely is it to generate a Repeated Guid?

What is the probability of generating a Repeated Guid with Guid.NewGuid() ? I'm uploading numerous images from my system. The same will be a MultiTenancy, and will share the same Deploy, from the same folders. I assign the name of...
asked by 14.11.2014 / 18:46
1
answer

Guid.Parse () or new Guid ()?

What is the main difference between using the options Guid.Parse() or new Guid() to convert a string into a Guid ? And which of the two approaches would be best to use? var usuarioId = new Guid(User.Identity.GetUse...
asked by 12.04.2018 / 15:03
1
answer

What is the purpose and use of the GuidAttribute?

I know the GUID is a 'unique' identifier, but I do not see the why of your application's attribute, as in the example below: [GuidAttribute("C281C7F1-4AA9-3517-961A-463CFED57E75")] [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)]...
asked by 19.02.2017 / 13:45
2
answers

C # Regular string expression and Guid validation

(1). I would like to validate a string, checking if it has only {a-z], [A-Z], [0-9], '-'} if(minhaString.ContemApenas({[a-z], [A-Z], [0-9], '-'}) == true) { // Minha string é válida! } (2). I need to also validate if such a string is a...
asked by 23.09.2015 / 21:38