|
3397 | 3397 | isEfCore3Plus ? "FromSqlRaw" : "FromSql", |
3398 | 3398 | isEfCore3Plus ? "Set" : "Query", |
3399 | 3399 | isEfCore3Plus ? "Entity" : "Query", |
3400 | | - isEfCore3Plus ? ".HasNoKey()" : string.Empty |
| 3400 | + isEfCore3Plus ? ".HasNoKey()" : string.Empty, |
| 3401 | + !Settings.StoredProcedureReturnTypes.ContainsKey(tvf.NameHumanCase) && !Settings.StoredProcedureReturnTypes.ContainsKey(tvf.DbName) |
3401 | 3402 | )) |
3402 | 3403 | .ToList(); |
3403 | 3404 |
|
|
6489 | 6490 | public string QueryString { get; } |
6490 | 6491 | public string ModelBuilderCommand { get; } |
6491 | 6492 | public string ModelBuilderPostCommand { get; } |
| 6493 | + public bool IncludeModelBuilder { get; } |
6492 | 6494 |
|
6493 | 6495 | public TableValuedFunctionsTemplateData(bool singleReturnModel, |
6494 | 6496 | string singleReturnColumnName, |
|
6503 | 6505 | string fromSql, |
6504 | 6506 | string queryString, |
6505 | 6507 | string modelBuilderCommand, |
6506 | | - string modelBuilderPostCommand) |
| 6508 | + string modelBuilderPostCommand, |
| 6509 | + bool includeModelBuilder) |
6507 | 6510 | { |
6508 | 6511 | SingleReturnModel = singleReturnModel && !string.IsNullOrEmpty(singleReturnColumnName); |
6509 | 6512 | SingleReturnColumnName = singleReturnColumnName; |
|
6520 | 6523 | QueryString = queryString; |
6521 | 6524 | ModelBuilderCommand = modelBuilderCommand; |
6522 | 6525 | ModelBuilderPostCommand = modelBuilderPostCommand; |
| 6526 | + IncludeModelBuilder = includeModelBuilder; |
6523 | 6527 | } |
6524 | 6528 | } |
6525 | 6529 | public class HiLoSequence |
@@ -18255,7 +18259,9 @@ using {{this}};{{#newline}} |
18255 | 18259 | {{#newline}} |
18256 | 18260 | // Table Valued Functions{{#newline}} |
18257 | 18261 | {{#each tableValuedFunctions}} |
| 18262 | +{{#if IncludeModelBuilder}} |
18258 | 18263 | modelBuilder.{{ModelBuilderCommand}}<{{ReturnClassName}}>(){{ModelBuilderPostCommand}};{{#newline}} |
| 18264 | +{{/if}} |
18259 | 18265 | {{/each}} |
18260 | 18266 | {{/if}} |
18261 | 18267 |
|
@@ -19748,7 +19754,9 @@ using {{this}};{{#newline}} |
19748 | 19754 | {{#newline}} |
19749 | 19755 | // Table Valued Functions{{#newline}} |
19750 | 19756 | {{#each tableValuedFunctions}} |
| 19757 | +{{#if IncludeModelBuilder}} |
19751 | 19758 | modelBuilder.{{ModelBuilderCommand}}<{{ReturnClassName}}>(){{ModelBuilderPostCommand}};{{#newline}} |
| 19759 | +{{/if}} |
19752 | 19760 | {{/each}} |
19753 | 19761 | {{/if}} |
19754 | 19762 |
|
@@ -21319,7 +21327,9 @@ using {{this}};{{#newline}} |
21319 | 21327 | {{#newline}} |
21320 | 21328 | // Table Valued Functions{{#newline}} |
21321 | 21329 | {{#each tableValuedFunctions}} |
| 21330 | +{{#if IncludeModelBuilder}} |
21322 | 21331 | modelBuilder.{{ModelBuilderCommand}}<{{ReturnClassName}}>(){{ModelBuilderPostCommand}};{{#newline}} |
| 21332 | +{{/if}} |
21323 | 21333 | {{/each}} |
21324 | 21334 | {{/if}} |
21325 | 21335 |
|
@@ -22935,7 +22945,9 @@ using {{this}};{{#newline}} |
22935 | 22945 | {{#newline}} |
22936 | 22946 | // Table Valued Functions{{#newline}} |
22937 | 22947 | {{#each tableValuedFunctions}} |
| 22948 | +{{#if IncludeModelBuilder}} |
22938 | 22949 | modelBuilder.{{ModelBuilderCommand}}<{{ReturnClassName}}>(){{ModelBuilderPostCommand}};{{#newline}} |
| 22950 | +{{/if}} |
22939 | 22951 | {{/each}} |
22940 | 22952 | {{/if}} |
22941 | 22953 |
|
|
0 commit comments