I see many models of systems on the net where Id fields are defined with type GUID instead of INT, as in the example below:
public class Product
{
public Guid Id { get; protected set; }
public string Name { get; protected set; }
public int Quantity { get; protected set; }
public DateTime Created { get; protected set; }
public DateTime Modified { get; protected set; }
public bool Active { get; protected set; }
}
- What is the advantage of using GUID instead of INT?
- Can this damage the performance of the Application and / or database?
- I have a commercial system that is still being designed ... If I use GUIDS instead of INTS in my tables, would this be recommended?
A hug to everyone!