The wizard in VS should generate you the CSDL as well.

--
Mgr. Jiří Činčura
Independent IT Specialist




On Mon, Feb 2, 2015 at 11:13 AM -0800, "Christoph Gasser" 
<christoph.gas...@stranto.com<mailto:christoph.gas...@stranto.com>> wrote:


*         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

Firebird-net-provider@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/firebird-net-provider


845a8f621f6d43b09e7c5f8288e69d35@S05-MBX01-01.S05.local

Von: Christoph Gasser
Gesendet: Samstag, 31. Jänner 2015 12:47
An: 'firebird-net-provider@lists.sourceforge.net'
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
------------------------------------------------------------------------------
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
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to