update template using nameof to specify id

This commit is contained in:
CodeLiturgy 2022-08-29 17:30:24 +01:00
parent eba84c9cd7
commit b5b2b758c9
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ namespace BlueWest.WebApi.EF
[EfUpdateMethods(
updateType: typeof(CompanyUpdate),
returnType: typeof(CompanyUnique),
keyPropertyMemberName: "Id",
keyPropertyMemberName: nameof(Company.Id),
keyPropertyMemberType: typeof(int))
]
@ -36,7 +36,7 @@ namespace BlueWest.WebApi.EF
[EfUpdateMethods(
updateType: typeof(IndustryUpdate),
returnType: typeof(IndustryUnique),
keyPropertyMemberName: "Id",
keyPropertyMemberName: nameof(Industry.Id),
keyPropertyMemberType: typeof(int))
]

View File

@ -24,7 +24,7 @@ namespace BlueWest.WebApi.EF
[EfUpdateMethods(
updateType: typeof(CountryUpdate),
returnType: typeof(CountryUnique),
keyPropertyMemberName: "Id",
keyPropertyMemberName: nameof(Country.Id),
keyPropertyMemberType: typeof(int))
]
public DbSet<Country> Countries { get; set; }
@ -38,7 +38,7 @@ namespace BlueWest.WebApi.EF
[EfUpdateMethods(
updateType: typeof(CurrencyUpdate),
returnType: typeof(CurrencyUnique),
keyPropertyMemberName: "Id",
keyPropertyMemberName: nameof(Currency.Id),
keyPropertyMemberType: typeof(int))
]
public DbSet<Currency> Currencies { get; set; }