Page 1 of 1

ADO.Net Entity Model (Edmx) vs Devart Entity Model(Edml)

Posted: Wed 15 Dec 2010 07:44
by atmuc
is there any restriction to use one of them for standard entity frame properties. for example i have to problem.

one of them to add a view to model. in edmx when i try to "Update Model From Database"/Add view, nothing happens.it can not add a view like as simple as select * from table. i can add this view to edml by dragging it from Database Explorer.

another problem is to add add function.for edmx i do get column information it show a windows with name "dotConnect for Oracle".there is just SYS_REFCURSOR. when i execute it window dissappears and nothing is added. i can add this sp from Database Explorer.

is there any restriction to use dotconnect with edmx files?

create or replace
PROCEDURE SP_GET_INVESTMENT_TRANSACTIONS
(
p_recordset1 OUT SYS_REFCURSOR
) AS
BEGIN
OPEN p_recordset1 FOR
SELECT *
FROM PRODUCT;

END;

Posted: Wed 15 Dec 2010 12:46
by AndreyR
There are no specific restrictions for .edmx model usage.
The structure of Microsoft and Devart entity models is almost identical.
1. The reason of such behaviour is the fact that views do not have any primary key defined. Entity Framework performs an attempt to infer Entity Key from not null columns, if possible. In case of success the view is added, in other case it is added as XML comment to the SSDL part of the model (you can see it by opening the .edmx model in any XML editor).
Entity Developer in any case will add the view to designer, it is a bit more convenient behaviour.
2. The reason of this issue is the difference between Oracle and SQL Server implementations of Stored Procedures.
In Oracle, procedure in fact does not have a result set. Instead it returns a cursor that can be read, and in this way the result set is obtained.
There is no possibility to handle this situation in design time using pure Entity Framework.
We have described the way to solve this problem in this blog article.