-
Notifications
You must be signed in to change notification settings - Fork 60
If NotifyPropertyChanged is active, wrong Output is generated #97
Comments
Found it and (hopefully) fixed it. Turned out to be a mixup between the AutoProperty and ImplementNotify flags. Give it a go in 1.3.0.5 and let me know if there are still issues. |
Oh no - just tried to test out this issue with the new version, but opening the model fails with "object reference is not set to an instance" error. Any ideas what causes the error message? |
Hmm. Let me look. What project type, EF version and .NET version? |
Projecttype: .Net Core 3.0 Class library on EF Core 3.0.0
Microsoft Visual Studio Professional 2019
Version 16.3.1
VisualStudio.16.Release/16.3.1+29324.140
Microsoft .NET Framework
Version 4.8.03752
Installierte Version: Professional
Visual C++ 2019 00435-60000-00000-AA004
Microsoft Visual C++ 2019
ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools
Allgemeine Azure-Tools 1.10
Bietet allgemeine Dienste für die Verwendung durch Azure Mobile Services und Microsoft Azure-Tools.
Application Insights-Tools für Visual Studio-Paket 9.1.00913.1
Application Insights-Tools für Visual Studio
ASP.NET and Web Tools 2019 16.3.283.64955
ASP.NET and Web Tools 2019
ASP.NET Web Frameworks and Tools 2019 16.3.283.64955
Weitere Informationen finden Sie unter https://www.asp.net/.
Azure App Service-Tools v3.0.0 16.3.283.64955
Azure App Service-Tools v3.0.0
Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.
Azure Data Lake Tools for Visual Studio 2.4.1000.0
Microsoft Azure Data Lake Tools for Visual Studio
Azure Functions and Web Jobs Tools 16.3.283.64955
Azure Functions and Web Jobs Tools
Azure Stream Analytics Tools for Visual Studio 2.4.1000.0
Microsoft Azure Stream Analytics Tools for Visual Studio
C#-Tools 3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
C#-Komponenten, die in der IDE verwendet werden. Abhängig von Ihrem Projekttyp und den zugehörigen Einstellungen kann eine andere Version des Compilers verwendet werden.
CodeMaid 11.0.183
CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
Entity Framework 6 Power Tools 0.9.2
Preview of useful design-time DbContext features, added to the Visual Studio Solution Explorer context menu.
When right-clicking on a file containing a derived DbContext class, the following context menu functions are supported:
1) View Entity Data Model (Read-only) - Displays a read-only view of the Code First model in the Entity Model Designer.
2) View Entity Data Model XML - Displays the EDMX XML representing the underlying Code First model.
3) View Entity Data Model DDL SQL - Displays the DDL SQL corresponding to the SSDL in the underlying EDM Model.
4) Generate Views - Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.
When right-clicking on an Entity Data Model (*.edmx) file, the following context menu function is supported:
Generate Views - Generates pre-compiled views used by the EF runtime to improve start-up performance. Adds the generated views file to the containing project.
Entity Framework Core Power Tools 1.0
Adds useful design-time EF Core DbContext features to the Visual Studio Solution Explorer context menu.
Extensibility Message Bus 1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
GitHub.VisualStudio 2.10.6.8105
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.
IntelliCode-Erweiterung 1.0
Detaillierte Informationen zur IntelliCode Visual Studio-Erweiterung
Microsoft Azure-Tools 2.9
Microsoft Azure-Tools für Microsoft Visual Studio 0x10 – v2.9.20816.1
Microsoft Azure HDInsight Azure Node 2.4.1000.0
HDInsight Node under Azure Node
Microsoft Azure Hive Query Language Service 2.4.1000.0
Language service for Hive query
Microsoft Azure Stream Analytics Language Service 2.4.1000.0
Language service for Azure Stream Analytics
Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node
Microsoft Continuous Delivery Tools für Visual Studio 0.4
Die Konfiguration von Azure DevOps-Pipelines von der Visual Studio-IDE aus wird vereinfacht.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++-Assistenten 1.0
Microsoft Visual C++-Assistenten
Microsoft Visual Studio-Tools für Container 1.1
Jetzt können Sie Ihre ASP.NET Core-Anwendung in der Zielumgebung entwickeln, ausführen und überprüfen. Drücken Sie F5, um die Anwendung direkt in einem Container mit Debugfunktionen auszuführen, oder STRG+F5 zum Bearbeiten und Aktualisieren Ihrer Anwendung, ohne den Container erneut erstellen zu müssen.
Mono Debugging for Visual Studio 16.3.7 (9d260c5)
Support for debugging Mono processes with Visual Studio.
NuGet-Paket-Manager 5.3.0
NuGet-Paket-Manager in Visual Studio. Weitere Informationen zu NuGet finden Sie unter https://docs.nuget.org/.
Office Developer Tools für Visual Studio 16.0.29217.00
Microsoft Office Developer Tools für Visual Studio
ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info
SQL Server Data Tools 16.0.61908.27190
Microsoft SQL Server Data Tools
Syntax Visualizer 1.0
An extension for visualizing Roslyn SyntaxTrees.
ToolWindowHostedEditor 1.0
Hosting json editor into a tool window
TypeScript-Tools 16.0.10821.2002
TypeScript-Tools für Microsoft Visual Studio
VC-Paket für Microsoft Visual Studio 1.0
VC-Paket für Microsoft Visual Studio
Visual Basic-Tools 3.3.1-beta3-19461-02+2fd12c210e22f7d6245805c60340f6a34af6875b
Visual Basic-Komponenten, die in der IDE verwendet werden. Abhängig von Ihrem Projekttyp und den zugehörigen Einstellungen kann eine andere Version des Compilers verwendet werden.
Visual F# Tools 10.4 für F# 4.6 16.3.0-beta.19455.1+0422ff293bb2cc722fe5021b85ef50378a9af823
Microsoft Visual F# Tools 10.4 für f# 4.6
Visual Studio-Tools für Container 1.0
Visual Studio-Tools für Container
Visual Studio Code-Debugadapter-Hostpaket 1.0
Interopebene zum Hosten der Visual Studio Code-Adapter in Visual Studio
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
Workflow Manager Tools 1.0 1.0
Dieses Paket enthält die erforderlichen Visual Studio-Integrationskomponenten für Workflow Manager.
Xamarin 16.3.0.274 (d16-3@06531f8)
Visual Studio-Erweiterung, um Entwicklung für Xamarin.iOS und Xamarin.Android zu ermöglichen.
Xamarin Designer 16.3.0.230 (remotes/origin/d16-3-xcode11@bbe518670)
Visual Studio-Erweiterung zum Aktivieren der Xamarin Designer-Tools in Visual Studio.
Xamarin Templates 16.3.565 (27e9746)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 10.0.0.43 (d16-3/8af1ca8)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: mono/mono/2019-06@7af64d1ebe9
Java.Interop: xamarin/java.interop/d16-3@5836f58
LibZipSharp: grendello/LibZipSharp/d16-3@71f4a94
LibZip: nih-at/libzip/rel-1-5-1@b95cf3f
ProGuard: xamarin/proguard/master@905836d
SQLite: xamarin/sqlite/3.27.1@8212a2d
Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-3@cb41333
Xamarin.iOS and Xamarin.Mac SDK 13.2.0.42 (5e8a208)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Von: Michael Sawczyn <notifications@github.com>
Gesendet: Montag, 30. September 2019 16:18
An: msawczyn/EFDesigner <EFDesigner@noreply.github.com>
Cc: ANM86 <angleitner@hotmail.com>; Author <author@noreply.github.com>
Betreff: Re: [msawczyn/EFDesigner] If NotifyPropertyChanged is active, wrong Output is generated (#97)
Hmm. Let me look. What project type, EF version and .NET version?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmsawczyn%2FEFDesigner%2Fissues%2F97%3Femail_source%3Dnotifications%26email_token%3DALZ3XFZB5WKKQYRVOIWUF3DQMIDAXA5CNFSM4ITCPHSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD75ZSOQ%23issuecomment-536582458&data=02%7C01%7C%7C752903fea7e84552e0b408d745b0f815%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637054498682416802&sdata=tIvBiOQDt8Z8c4rXGEzxZQdgCDbPNzbXCqBoBSQ%2FK4w%3D&reserved=0>, or mute the thread<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FALZ3XF577FDJN75BNRMBC23QMIDAXANCNFSM4ITCPHSA&data=02%7C01%7C%7C752903fea7e84552e0b408d745b0f815%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637054498682416802&sdata=6M%2F56T2nkDmEseXSLYLLuRI4e6yxiCqVDtv%2FmLlSqQg%3D&reserved=0>.
|
Thanks for the report - there definitely is a problem, but it appears to be limited to EFCore3 (I hope). It's going to be more involved than I have time for right now, but I believe I know how to work around it and will have a fix in tonight. I've pulled it from the Marketplace for the interim period until I can get that fix in place. |
1.3.0.4 did work work fine with Core3 (since the release, on last Monday) |
Please take a look at the 1.3.0.6 pre-release. Look forward to your feedback. |
Hi Michael, Thanks for your quick response. I've just installed 1.3.0.6, but the problem is still existing. |
Could you please make available a small model file that shows the problem? Or repro steps? Does this happen right when you open an existing model? |
Tricky thing... I just tried to create a new project for reproducing the error during loading the diagram and which i can send to you. But I had no success, there it worked. So I back on my development solution. There I have 2 diagrams in use. One gives the error with the null reference. The second diagram now opens (it didn't yesterday), but now it looks like a new one. No entity or enum is displayed. It is completely empty. I have no idea, what's causing that |
I just want to let you know that now the error is back on both models in my project - that's crazy |
Not sure what's going on here, but I'm unable to reproduce it. I'm posting 1.3.0.7 for a critical fix to Min/MaxLength properties; please see if this version still causes you issues. If so, I'll need to see a model file that shows the problem. |
v1.3.0.7 is now in the releases section here on GitHub |
Some kind of good news. One more thing => I played a bit around with it, to find out which entity makes the trouble. It is the entity named "ParentEntity" on the Top. If you remove it, the diagram will open also in v1.3.0.5 and above. I was not able to spot any suspicious properties or anything like that. So maybe you can find something, which causes the null reference. |
Add: If you remove the 2 navigations ParentTable->Child and ParentTable->CustomEntity, you will be able to open the diagramm again. |
I just took a short look on it => seems to work again now. Great Job! Thx! |
Generally it seems to work. When NotifyPropertyChanged is enabled, then in the generated ouput the HasIndex Syntax targets the shadow property, which is protected.
e.g.:
modelBuilder.Entity<global::Test.Model.ParentTable>().HasIndex(t => t._Name);
is generated instead of
modelBuilder.Entity<global::Test.Model.ParentTable>().HasIndex(t => t.Name);
The text was updated successfully, but these errors were encountered: