include::../introduction-dotnet.adoc[]

include::../why-dotnet.adoc[]

include::../how-dotnet.adoc[]

=== Code examples

==== Noncompliant code example

[source,csharp,diff-id=1,diff-type=noncompliant]
----
internal class Account
{
    public DateTime Id { get; set; }

    public string Name { get; set; }
    public string Surname { get; set; }
}
----

==== Compliant solution

[source,csharp,diff-id=1,diff-type=compliant]
----
internal class Account
{
    public Guid Id { get; set; }

    public string Name { get; set; }
    public string Surname { get; set; }
}
----

or

==== Noncompliant code example

[source,csharp,diff-id=2,diff-type=noncompliant]
----
internal class Person
{
    [Key]
    public DateTime PersonIdentifier { get; set; }

    public string Name { get; set; }
    public string Surname { get; set; }
}
----

==== Compliant solution

[source,csharp,diff-id=2,diff-type=compliant]
----
internal class Person
{
    [Key]
    public Guid PersonIdentifier { get; set; }

    public string Name { get; set; }
    public string Surname { get; set; }
}
----

include::../resources-dotnet.adoc[]