update template using nameof to specify id
This commit is contained in:
parent
eba84c9cd7
commit
b5b2b758c9
|
@ -18,7 +18,7 @@ namespace BlueWest.WebApi.EF
|
||||||
[EfUpdateMethods(
|
[EfUpdateMethods(
|
||||||
updateType: typeof(CompanyUpdate),
|
updateType: typeof(CompanyUpdate),
|
||||||
returnType: typeof(CompanyUnique),
|
returnType: typeof(CompanyUnique),
|
||||||
keyPropertyMemberName: "Id",
|
keyPropertyMemberName: nameof(Company.Id),
|
||||||
keyPropertyMemberType: typeof(int))
|
keyPropertyMemberType: typeof(int))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace BlueWest.WebApi.EF
|
||||||
[EfUpdateMethods(
|
[EfUpdateMethods(
|
||||||
updateType: typeof(IndustryUpdate),
|
updateType: typeof(IndustryUpdate),
|
||||||
returnType: typeof(IndustryUnique),
|
returnType: typeof(IndustryUnique),
|
||||||
keyPropertyMemberName: "Id",
|
keyPropertyMemberName: nameof(Industry.Id),
|
||||||
keyPropertyMemberType: typeof(int))
|
keyPropertyMemberType: typeof(int))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace BlueWest.WebApi.EF
|
||||||
[EfUpdateMethods(
|
[EfUpdateMethods(
|
||||||
updateType: typeof(CountryUpdate),
|
updateType: typeof(CountryUpdate),
|
||||||
returnType: typeof(CountryUnique),
|
returnType: typeof(CountryUnique),
|
||||||
keyPropertyMemberName: "Id",
|
keyPropertyMemberName: nameof(Country.Id),
|
||||||
keyPropertyMemberType: typeof(int))
|
keyPropertyMemberType: typeof(int))
|
||||||
]
|
]
|
||||||
public DbSet<Country> Countries { get; set; }
|
public DbSet<Country> Countries { get; set; }
|
||||||
|
@ -38,7 +38,7 @@ namespace BlueWest.WebApi.EF
|
||||||
[EfUpdateMethods(
|
[EfUpdateMethods(
|
||||||
updateType: typeof(CurrencyUpdate),
|
updateType: typeof(CurrencyUpdate),
|
||||||
returnType: typeof(CurrencyUnique),
|
returnType: typeof(CurrencyUnique),
|
||||||
keyPropertyMemberName: "Id",
|
keyPropertyMemberName: nameof(Currency.Id),
|
||||||
keyPropertyMemberType: typeof(int))
|
keyPropertyMemberType: typeof(int))
|
||||||
]
|
]
|
||||||
public DbSet<Currency> Currencies { get; set; }
|
public DbSet<Currency> Currencies { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue