Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct Stirling -> Sterling #3538

Merged
merged 1 commit into from
Nov 9, 2021
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/what-is-new/ef-core-6.0/whatsnew.md
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ Pre-convention model configuration is very useful when working with value object
public enum Currency
{
UsDollars,
PoundsStirling
PoundsSterling
}
-->
[!code-csharp[MoneyType](../../../../samples/core/Miscellaneous/NewInEFCore6/PreConventionModelConfigurationSample.cs?name=MoneyType)]
Expand Down
14 changes: 7 additions & 7 deletions samples/core/Miscellaneous/NewInEFCore6/HasConversionSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void PopulateDatabase()
},
new TestEntity1
{
Currency = Currency.PoundsStirling
Currency = Currency.PoundsSterling
},
new TestEntity2
{
Expand All @@ -53,7 +53,7 @@ public static void PopulateDatabase()
},
new TestEntity2
{
Currency = Currency.PoundsStirling
Currency = Currency.PoundsSterling
},
new TestEntity3
{
Expand All @@ -65,7 +65,7 @@ public static void PopulateDatabase()
},
new TestEntity3
{
Currency = Currency.PoundsStirling
Currency = Currency.PoundsSterling
});

context.SaveChanges();
Expand All @@ -83,7 +83,7 @@ public class TestEntity2
public int Id { get; set; }
public Currency Currency{ get; set; }
}

public class TestEntity3
{
public int Id { get; set; }
Expand All @@ -94,7 +94,7 @@ public class TestEntity3
public enum Currency
{
UsDollars,
PoundsStirling,
PoundsSterling,
Euros
}
#endregion
Expand All @@ -104,8 +104,8 @@ public class CurrencyToSymbolConverter : ValueConverter<Currency, string>
{
public CurrencyToSymbolConverter()
: base(
v => v == Currency.PoundsStirling ? "£" : v == Currency.Euros ? "€" : "$",
v => v == "£" ? Currency.PoundsStirling : v == "€" ? Currency.Euros : Currency.UsDollars)
v => v == Currency.PoundsSterling ? "£" : v == Currency.Euros ? "€" : "$",
v => v == "£" ? Currency.PoundsSterling : v == "€" ? Currency.Euros : Currency.UsDollars)
{
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public static void PopulateDatabase()
{
Name = "Arthur",
IsActive = true,
AccountValue = new Money(1090.0m, Currency.PoundsStirling),
AccountValue = new Money(1090.0m, Currency.PoundsSterling),
Orders =
{
new()
{
OrderDate = new DateTime(2021, 7, 31),
Price = new Money(29.0m, Currency.PoundsStirling),
Discount = new Money(5.0m, Currency.PoundsStirling)
Price = new Money(29.0m, Currency.PoundsSterling),
Discount = new Money(5.0m, Currency.PoundsSterling)
}
}
},
Expand Down Expand Up @@ -119,7 +119,7 @@ public override string ToString()
public enum Currency
{
UsDollars,
PoundsStirling
PoundsSterling
}
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public override string ToString()
public enum Currency
{
UsDollars,
PoundsStirling
PoundsSterling
}
#endregion
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public override string ToString()
public enum Currency
{
UsDollars,
PoundsStirling
PoundsSterling
}
#endregion

Expand All @@ -125,7 +125,7 @@ public class Blog
{
public int Id { get; set; }
public string Name { get; set; }

public IList<AnnualFinance> Finances { get; set; }
}
#endregion
Expand Down