locked
Scalar Function not appearing in EDMX 6.0 RRS feed

  • Question

  • User1858009984 posted

    I am having a Scalar Function in SQL Server 2014 version, but when i use this in EDMX the function is not appearing in Complex Types in EDMX 6.0 version

    While adding classes in EDMX from SQL Server, i added even SQL function and I can even run the SQL Function in SSMS and when i tested with Stored Procedure its working fine

    So how to resolve this issue.

    Tuesday, August 15, 2017 1:42 PM

All replies

  • User475983607 posted

    I am having a Scalar Function in SQL Server 2014 version, but when i use this in EDMX the function is not appearing in Complex Types in EDMX 6.0 version

    A scalar is not a complex type.  Scalar values are single items like integers and stings.  

    Tuesday, August 15, 2017 2:40 PM
  • User-832373396 posted

    Hi Ravindran,

    Ravindranath M

    I am having a Scalar Function in SQL Server 2014 version, but when i use this in EDMX the function is not appearing in Complex Types in EDMX 6.0 version

    First , this Scalar Function stored Procdure should be custom function by yourself , if so ,next;

    Next , i guess that you are using EF database first and you have chose Update Model from database at EDMX , choose the Scalar Function Stored Procedure , after that , I guess you deleted Scalar Function from  Complex Types manually , then you want to re-generate  it via EDMX , but it doesn't occur at able selected Stored Procedure any more , or you could select it ,but it doesn't generate it to  Complex Types any more .

    Solution :

    1 :First,delete all  Scalar Function manually :

    1 Under Complex Types(for example: sp_getTreeById_Result)
    
    2 Under Function Imports(for example:sp_getTreeById)
    
    3 Under .store->Stored Procedures/Functions(for example:sp_getTreeById)

    2: Right-click at .edmx and choose   Update Model from database  , then choose Scalar Function  ;

    With regards,

    Angelina Jolie

    Wednesday, August 16, 2017 9:17 AM