EntityFramework-Reverse-POCO-Code-First-Generator icon indicating copy to clipboard operation
EntityFramework-Reverse-POCO-Code-First-Generator copied to clipboard

Including Table-valued Functions and Scalar-valued Functions

Open smarteez17 opened this issue 6 years ago • 6 comments

Hi There

Question 1 #130 I see an option IncludeTableValuedFunctions but no option for Scalar-valued Functions how can I bring both in? Some of my TableValuedFunctions uses Scalar-valued Functions

Also, Can I bring both in without bringing StoredProcedures as I see in in the notes I have to make IncludeStoredProcedures = true ( I have over 1000 Stored Proc with I am not using, This project I working on is converting the Stored Procs into linq )

Question 2

Like with Views under Settings.TableRename there is an option to set the word "View" if(isView) name = "View" + name ; Is there an option for StoredProcedures and Functions as well ? . I try to group all the files together due to I got Settings.GenerateSeparateFiles = true;

Question 3

Is there a way to exclude a list of TableValuedFunctions?

Question 4

having the same issues as #519

smarteez17 avatar Sep 19 '19 05:09 smarteez17

@sjh37 Any update regarding this

smarteez17 avatar Sep 23 '19 09:09 smarteez17

Hi @smarteez17 I'm going to have to put this on my TODO list after v3 goes live.

sjh37 avatar Sep 23 '19 10:09 sjh37

Thanks, what's new with Version 3 and when is it going live

smarteez17 avatar Sep 23 '19 10:09 smarteez17

v3 supports .Net Core 2, .Net Core 3, and of course EF6. It also uses {{mustache}} templates instead of T4. That means you can provide your own templates to fully customise how the output looks. It can also do multi-context output in a single go if you have a separate database listing all the tables and columns you want generated for each db-context.

sjh37 avatar Sep 23 '19 10:09 sjh37

I have added scalar-valued functions to the new (not yet released) v3 of the generator. Code available on DropBox.

sjh37 avatar Oct 14 '19 20:10 sjh37

I have added scalar-valued functions to the new (not yet released) v3 of the generator. Code available on DropBox.

As described here, scalar-valued functions have to be declared as static methods, but they are generated as non-static. How do I call the scalar-valued function as part of a query, if they are not static and the available context is only the inferface and not the real implementation?

ahosamuel avatar Aug 27 '20 14:08 ahosamuel