Closed airomero closed 4 years ago
It's on my todo list. However, I want to get a few things out of the way before I look at EF7 / EF Core 1.0.
@sjh37 Thanks on your great project.
I started on a new GUI, to handle All the properties of the reverse poco, and any other new one that might get added in the future, and handle the multiple model/poco projects in one solution, but it looks that the new projects/assignments/finance will delay that, when the time comes, its what i can give as gift to your great idea/work.
But please, add SQLite in the middle, as its almost a defecto in devices like mobiles. and when you look at EF7, try to a have a look at it from the perspective of PCL, especially the Xamarin.Forms PCL, when code is generated.
Cool. Thanks and no problem, will do.
I cover all the options in detail in module 2 if you have a pluralsight subscription.
Thanks, your Tutorial is on my schedule of "To-See".
Watched your PluralSight Tutorial. My co-workers and I want to use it on Core 1.0 when it comes out next month. Can't wait for EF7 support. When I can scaffold controllers and views in MVC6 from the POCO class this will be amazing. Thanks for making such a game changing plugin!
Hey! Any update on this one? EF core is RTM and we can't wait for EFRPoco to support it!
Hi. Nothing started with EF7.
@sjh37 While its your decision alone, but i suggest: if there going to be a move to EF7, that its better to be in another repository, with a different name, because of the too much difference, and because EF7 is still a child that might change its directions, and last, EF6 will stay dominant till people leave the windows desktop applications and the old ASP.Net, and that will take a long time, if it happens.
I just learned about your generator! Really cool. Do you know if the resulting class built with your generator and EF6 can be used with Asp.Net Core and EF7?
I've never tried, but it can't be too far off.
@cyberbobcity You can use EF6 (and the code generated by this tool) with ASP.NET Core.
Yes, that's what i am doing right now, and its working perfectly. and by doing like that, we don't wast the project owner time, to think of re-doing it(EntityFramework-Reverse-POCO-Code-First-Generator) to work with .netstandard.
Then
Then
Then
then
Now when ever you want to re-generate your entities, go to solution 'SolutionA-POCO', and run the .tt(s). and your .netstandard projects will refresh with the new regenerated entities.
Hi @reader-man. I'm puzzled as to how you did this without retargeting the project to full .net framework?! I tried to move the generated .cs class to my Core project targeting netcoreapp1.1 and that yielded lots of errors due to Entity.DbSet being in a completely different namespace in core and some of the other classes not even existing in the new namespace... ??
OK everybody loving this tool too much to give it up for cross-platform compatability when using the Angular 2 template as I've been trying to do (and finally succeeded). I do not think this tool can actually be run on .NET Core targeting netcore 1.1 (really not sure how @reader-man supposedly did that) but if you don't mind Re-targeting, in my case re-targeting the current Angular 2 project template with hot-reload etc. which after doing so throws an exception on UseWebpackDevMiddleware, then know that it has a fix. It is apparently a bug in .net which can be fixed by adding the System.Net.Http package to your project. At least it worked for me. This is the source of the info: https://github.com/aspnet/JavaScriptServices/issues/802 .
@marekvse, Well sorry, for the late reply, as i am too busy on several projects in the same time, desktop/asp.net core/mobile/several sicknesses :). if i did not forget this page open, i would have not noticed the replies, as i am monitoring too many projects on github, that my inbox has lots of daily clutter.
lets begin answering: first i am mainly talking about generating POCO classes as seen from the Picture, not the DataContext, as that is the main problem in my projects that have hundreds of tables, and i wanted to port them to .netstandard, to have them work on multiple platforms/technologies.
and i am using several github open source projects, after i ported most of their code to .netstandard, as seen from the pics under:
plus, i am still working on an old Reverse Poco version v2.17.1, because i have my own needs, and have changed its code, so currently its serving me ok, and till now, did not need to upgrade, which will take time, which i don't have.
for the DataContext, i will be working on it these days, and see if that is possible or not, strictly on .netstandard 1.6, and if need be, go to .net core 1.1.
my wish is for .netstandard 2.0 beta comes out, as it will speed porting and ease it.
ok guys @sjh37, @marekvse, @ErikEJ, @cyberbobcity, @airomero, , thank god, managed to make the simplest entity/table to read data from a database with a DataContext in a NetStandard 1.6 project.
so now, the POCOs are in a NetStandard project and the DataContext in another NetStandard 1.6.
and i am initiating them from a .NetCore 1.1 ASP project.
as seen:
Had To change several things in Mr. Simon Hughes @sjh37 .tt files.
also added support classes to help in converting between old EF to new EF Core. Not all Support Classes work, some of them are just surrogates for later to be filled/fixed, as i wanted to make sure that its possible before investing more time in it, if any one wants to help further, he's welcome.
Made a simple table with only integer fields as i couldn't fix the errors coming from the varchar/nvarchar fields.
thanks to projects like URF + DbContextScope.EfCore, that i also had to port them to NetStandard, this was possible.
All my current projects are here if people are interested, i don't know if i will have time to add them to github or not, as i never used it, i don't know if it will take too much time to learn and use.
Make a folder in "D:\" drive, and decompress the files in the same order and same names like the included picture "02 Projects Structure.png", as they are interconnected, and i don't know if problems will arise if changed their placement.
also, the file "Simple Table.txt", has the structure of the table, as if u use different types, u might get errors.
The Folders: A: D:\4_PrjB\ConstructionToolsB\ConstructionToolsB.sln This is the main Solution, that has the POCO Projects + DataContext Project + ASP.Net Core Project. The main projects you should concentrate on are: D:\4_PrjB\ConstructionToolsB\BAL\DOM\Company D:\4_PrjB\ConstructionToolsB\DAL\ContextDAL\CompanyDAL
B: D:\4_PrjB\ConstructionToolsB-POCO\ConstructionToolsB-POCO.sln This is the where to run the .tt files, as it uses Old plain EF 6, to generate the POCO classes & the DataContext classes, and its .csproj are moved to "A" Solution folder and in the NetStandard projects, so they can generate the files and get collected immediately by the NetStandard projects.
C: D:\4_Prj\CommonLibrariesCore\Main\Src Main Common Libraries
D: D:\4_Prj\CommonLibrariesCore\zOtherTools Open Source Projects, ported to NetStandard.
The Helper projects: D:\4_Prj\CommonLibrariesCore\Main\Src\Common\Uti\OldNet D:\4_Prj\CommonLibrariesCore\zOtherTools\DbContextScope\src\oldNetEF D:\4_Prj\CommonLibrariesCore\zOtherTools\DbContextScope\src\OldNetEFContext
Well I tried my best to explain most of the needed stuff, the rest is code that you can look into.
Regards. and thanks again to @sjh37 for this great tool, especially when compared to the new .Net Core tools.
Sorry forget to say that
the .tt files that have changed to work for NetStandard, have the sentences above the changes: //Added By Me //Changed By Me
while there are other changes done other than these ones, but they are not related to NetStandard, and they are located in: D:\4_PrjB\ConstructionToolsB\BAL\DOM\Company D:\4_PrjB\ConstructionToolsB\DAL\ContextDAL\CompanyDAL
the .tt files are v2.17.1.
@reader-man Have you tried the SQLite Toolbox Reverse engineer GUI (works with SQL Server, SQL Compact and SQLite) https://twitter.com/ErikEJ/status/834405829889638402 ?
@ErikEJ Many Thanks, i will give it a try in the coming days. š
The main thing about EF-Reverse-POC-Gen, is the huge number of customization/properties, that lend itself easily in complex developer needs/configurations.
So, while i did simple reversing in the past, but when i saw Mr. @sjh37 project, it was not just love at first site, but also addiction :), and by having it an option in ur project, its definitely a big plus by me.
Regards.
Same here.. Simple reverse-engineering tools are total pain. Simon's Reverse POCO solves so many problems with those that I have not seen anything remotely comparable with it.
I'm just trying to find out if there is any progress on Ef Core 2.0 support? And if there is anything I can do to help make this happen?
I've traced back to here from: https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/issues/322
Thanks
Hi, a big help would be to take the generated code for northwind, and convert it for use with ef core, send it to me, i'd run a diff to see whats changed, then I could implement the change in the generator to match what you had done manually.
Just throwing my support on EF Core 2.0 support.
Love this tool for EF 6... EF Core has been out for over a year now, and is become ever-more usable. It will probably be the new standard when EF Core 2.1 comes out, and I am really missing my EFRPCFG. Thanks!
@ErikEJ The workaround the SQLite Toolbox Reverse engineer is not working for Visual studio anymore. @sjh37 POCO support on EF core is highly required. Thanks for your job guys!
@ahakobyan Correct, my "EF Core Power Tools" is now an even better option, it also includes optional code customization (not quite like this template, of course)
I am also really looking forward to moving some of my projects to EF Core. Really love this tool and rely on it every day.
EF Core support would be great, I also would like to use it.
@sjh37 At this point, if you crowd funded the conversion, I bet you could make bank. :)
@kinetiq I already have most of the code for it from a contributor. I just need to digest and incorporate it properly. Lots of things went missing in EF core, such as the pluralisation service for one, so that had to be re-created, which I have now :-)
Any ideas when ef.core version release? Really nice!,
In the meantime you can use EF Core Power Tools (not as powerful as this template) https://github.com/ErikEJ/SqlCeToolbox/wiki/EF-Core-Power-Tools
@sjh37 Any updates on this?
I will start work on this w/c 9th April.
Great to hear that EF Core support is on the way. I use this superb tool virtually every day of my working life, and EF Core does not appeal to me until I know I can use this great tool along-side it. Your tool really is THAT GOOD :)
I am on holiday and will start working on this when I get back.
Update Coding is well underway and being done on this branch: https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator/tree/EF.Core Currently refactoring everything so can generate for EF6 or Core, plus a few other architecture changes such as making it ready to read from other databases such as Oracle, MySql, PostgreSQL. So far so good, no stumbling blocks apart from having to include pluralisation within the generator as this is no longer supported by EF.Core.
@sjh37 Sorry to bug you but any progress update on this? ...happy to help with testing
@f2calv Hi Alex, I've refactored it, and refactored it. I'm basically re-writing it from scratch. About half way through. Still lots of work to do. This is not a tweak of v2, but a full rewrite. I've moved it to a private repo for now as it's still in bits, and don't want any contributions to it. Slowly coming together. No ETA as it depends on how much free time I get.
I'm actually in the middle of adding temporal table support to the generator for EF 6....
one question is how the whole EF Core T4 going work together as T4 is not supported in .NET Core :( we are looking at any options and the only one which seems to work out of the box is this one:
Thanks for the great tool! I also am looking forward to the EF.Core version.
I started getting contributions to the ef.core branch even though Iām in the middle of refactoring & changing it. So I closed the branch and move it to a private repo so I could continue on without people wanting to continually change it before Iāve even finished. So donāt worry if you've seen the ef.core branch being removed, itās 100% going ahead, just other things keep getting in the way.
Itās been on hold as things have been crazy busy my end work wise, including applying for a new job. So have had my head down in architecture, Togaf, design patterns, DDD, hexagonal architectures, you name itā¦
Iām also writing a C# 7.x course for a popular on-line training provider, and they have deadlines to meet, so again this has pushed ef.core back.
No news on T4, and Iām still going to progress on that, and if that doesnāt pan out, Iāll investigate Roslyn and/or adding an extension to the ādotnetā command, something like ādotnet reversepoco settings.fileā. However someone guys from Turkey have sent me a modified version of the generator that works in Ef.core and utilises T4...
Really sorry Iāve not managed to progress as fast as Iād like.
No worries Simon, job is important and sort out other things first! T4 for EF core would great! Best regards, Alex
@sjh37 How's progress been with the T4 file from those blessed Turks? How much beer do I need to buy you? Good luck, mate.
Just wanted to chime in that I hope we get EF Core support at some point. I would pay money for it.
Looking to use this tool for a new upcoming project but would like to try and use Core if possible. Will need to use .NET for the interim until it's ready.
Any indication?
Good news: I'm back working on it. Bad news: Still a few months away yet. I've basically ripped it apart, completely refactored it and am currently in the middle of putting it back together. The new version will work with ef6/core, plus will have the ability to support other databases too. Sorry it's taken so long, wish I hadn't signed up to create another online course, but that is done now so my focus is back on efcore.
Whatās the new course? On Nov 13, 2018, 9:43 AM -0600, Simon Hughes notifications@github.com, wrote:
Good news: I'm back working on it. Bad news: Still a few months away yet. I've basically ripped it apart, completely refactored it and am currently in the middle of putting it back together. The new version will work with ef6/core, plus will have the ability to support other databases too. Sorry it's taken so long, wish I hadn't signed up to create another online course, but that is done now so my focus is back on efcore. ā You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Glad to hear it!
Hi, is there any plan to support EF7? EF7 is more stable now and we love EFReversePoco, so it'd be so nice to start playing with both together. Thanks!!