Properties in a partial class are not displayed in the Data Sources window!

Entity Framework created the necessary partial classes. I can add these partial classes to the Data Sources window, and the properties are displayed as expected. However, if I extend any of the classes in a separate source file, these properties do not appear in the Data Sources window even after building and updating.

All properties in partial classes of source files work as expected in the Data Sources window, unless the partial class was created using EF.

EDIT: After deleting the violation table for the edm designer, adding back to it is expected to work. Hardly a long-term solution. Anyone else run into a similar problem?

+3
source share
1 answer

I used the following work:

Step 1 ... Creating the necessary projects In your solution, create two projects: 1 - the application project (so the application that you are working, for example, the application for Windows forms) 2 - the datalayer project (the class library project, the one that makes the DLL like build result)

Step 2 ... Link Projects In the application project, add a link to the project in the datalayer project (links - add a link - project tab)

3... datalayer: - , - Linq to SQL ( .dbml) - - " " - , . - - , :    {      get {return "TEST";}  } - datalayer - ...

4 - - - , , .

  • TEST ...

, , .dbml DLL . Visual Studio ... dll , , , , , .

.. datalayer ..: D

, -...

+2

Source: https://habr.com/ru/post/1699145/


All Articles