From: Christoph G. <chr...@st...> - 2015-02-03 20:55:25
|
But this is exactly the point: it doesn't. I made a screenshot to explain. Below Entities there should be an object "V_PERSONENROLLE". The views name is "V_PERSONENROLLE". It exists commented or uncommented in the EDMX. It's part of the "modViews". As you can see, there are other entities like "T_PARAMETER". These are tables. Thank's for your support C Here's a link to the image: http://download.stranto.com/fbef6.jpg The wizard in VS should generate you the CSDL as well. -- Mgr. Jiří Činčura Independent IT Specialist * In designer I make "Update from database" * View is not added, but the error message is shown. * No entity is added under the myViewModel.tt file (in the VS solution). But there is an entity of the previous added table. Also under myViewModel.Context.tt\Entities there is no view entity added. There is no myview.cs class. There is one for the table. * I now save the EDMX file and open it as XML. I'm uncommenting the block for the view (and deleting the error message which is part of the commented block. * Adding part for "<Key>" referencing one of the columns of the view. * Saving the EDMX again. * Now I can't open it anymore in the designer. * In XML mode for EDMX file I get the message: "Entity type [myview] has no entity set". That's what I meant: I know would have to create (and update) the entities manually. BR C No. It's already there. -- Mgr. Jiří Činčura Independent IT Specialist Thank you for your reply. I found that information already. I also tried that already. But I then would have to add Entities manually, right? Or did I miss a step? This makes it very "not handsome" to use because during development process the views are changing a lot. Is there any other solution? Like marking columns in the database with #PK_GEN# or something similar? BR C http://blog.cincura.net/230207-what-the-hell-where-s-my-added-view/ -- Mgr. Jiří Činčura Independent IT Specialist ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Firebird-net-provider mailing list Fir...@li... https://lists.sourceforge.net/lists/listinfo/firebird-net-provider 845...@S0... Von: Christoph Gasser Gesendet: Samstag, 31. Jänner 2015 12:47 An: 'fir...@li...' Betreff: Firebird EF6 DDEX adding Views I'm using VS 2012, Firebird 2.5, EF6. When trying to add a View to my model in the designer I get the message: "The table/view 'Firebird.Firebird.V_MYVIEW' does not have a primary key defined and no valid primary key could be inferred. This table/view has been excluded. To use the entity, you will need to review your schema, add the correct keys, and uncomment it." That's because EF need a PK for every table / view. When using MSSQL there is an approach using ISNULL in the view to be able to add the view to the model. But ISNULL is not supported in Firebird. The underlying table of the view has PK which is also marked as #PK_GEN# . And I'm able to add this table to my model. So my question is: Does anyone know how to add a view to a EF6 model in designer? BR C |