Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion entity-framework/core/modeling/keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can also configure multiple properties to be the key of an entity - this is

<!--
[PrimaryKey(nameof(State), nameof(LicensePlate))]
internal class Car
public class Car
{
public string State { get; set; }
public string LicensePlate { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion samples/core/Modeling/Keys/DataAnnotations/KeyComposite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal class MyContext : DbContext

#region KeyComposite
[PrimaryKey(nameof(State), nameof(LicensePlate))]
internal class Car
public class Car
{
public string State { get; set; }
public string LicensePlate { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion samples/core/Modeling/Keys/DataAnnotations/KeySingle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal class MyContext : DbContext
}

#region KeySingle
internal class Car
public class Car
{
[Key]
public string LicensePlate { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
#endregion
}

internal class Car
public class Car
{
public int CarId { get; set; }
public string State { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion samples/core/Modeling/Keys/FluentAPI/AlternateKeyName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
#endregion
}

internal class Car
public class Car
{
public int CarId { get; set; }
public string LicensePlate { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion samples/core/Modeling/Keys/FluentAPI/AlternateKeySingle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
#endregion
}

internal class Car
public class Car
{
public int CarId { get; set; }
public string LicensePlate { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion samples/core/Modeling/Keys/FluentAPI/KeyComposite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
#endregion
}

internal class Car
public class Car
{
public string State { get; set; }
public string LicensePlate { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion samples/core/Modeling/Keys/FluentAPI/KeySingle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
#endregion
}

internal class Car
public class Car
{
public string LicensePlate { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions samples/core/Modeling/Keys/KeyId.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ internal class MyContext : DbContext
}

#region KeyId
internal class Car
public class Car
{
public string Id { get; set; }

public string Make { get; set; }
public string Model { get; set; }
}

internal class Truck
public class Truck
{
public string TruckId { get; set; }

Expand Down
Loading