pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Function not imported in Entity Framework
9+ messages / 3 participants
[nested] [flat]

* Function not imported in Entity Framework
@ 2020-02-06 09:36  Vikram Sah <rblucky3@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Vikram Sah @ 2020-02-06 09:36 UTC (permalink / raw)
  To: pgsql-general

Dear sir/mam,

I want to integrate PostgreSQL database to entity framework in asp.net
using database first approach. but when try to add function then
error occurred:

*Error 6046: Unable to generate function import return type of the store
function.*

I have following configuration:

PostgreSQL 11.6,
npgsql v.4.0.9.0,
EntityFramework6.Npgsql 3.2.1.1,
in .net framework 4.5.2

*My function in postgresql database is :*

CREATE OR REPLACE FUNCTION dbo.EmployeeDetail ()
RETURNS TABLE (
emp_name VARCHAR,
emp_Id UUID
)
AS $$
BEGIN
RETURN QUERY SELECT
"EmployeName",
"EmployeeID"
FROM
dbo.Employee;
END; $$

LANGUAGE 'plpgsql';


Can you pls help! I did more researches but no luck.


Thanks!

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Function not imported in Entity Framework
@ 2020-02-06 15:38  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Vikram Sah <rblucky3@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Adrian Klaver @ 2020-02-06 15:38 UTC (permalink / raw)
  To: Vikram Sah <rblucky3@gmail.com>; pgsql-general

On 2/6/20 1:36 AM, Vikram Sah wrote:
> Dear sir/mam,
> 
> I want to integrate PostgreSQL database to entity framework in asp.net 
> <http://asp.net; using database first approach. but when try to add 
> function then error occurred:
> 
> *Error 6046: Unable to generate function import return type of the store 
> function.*

This really a question for the EntityFramework maintainers/users. Still 
I did find this:

https://stackoverflow.com/questions/24161005/error-6046-unable-to-generate-function-import-return-ty...



> 
> I have following configuration:
> 
> PostgreSQL 11.6,
> npgsql v.4.0.9.0,
> EntityFramework6.Npgsql 3.2.1.1,
> in .net framework 4.5.2
> 
> *My function in postgresql database is :*
> 
> CREATE OR REPLACE FUNCTION dbo.EmployeeDetail ()
> RETURNS TABLE (
> emp_name VARCHAR,
> emp_Id UUID
> )
> AS $$
> BEGIN
> RETURN QUERY SELECT
> "EmployeName",
> "EmployeeID"
> FROM
> dbo.Employee;
> END; $$
> 
> LANGUAGE 'plpgsql';
> 
> 
> Can you pls help! I did more researches but no luck.
> 
> 
> Thanks!
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Function not imported in Entity Framework
@ 2020-02-11 11:56  Vikram Sah <rblucky3@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Vikram Sah @ 2020-02-11 11:56 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general

Thank you so much sir, but it didn't work for me as the database function
in PostgreSQL and  EntityFramework6.Npgsql  is used as provider for entity
framework.

Thanks!
Vikram

On Thu, Feb 6, 2020 at 9:23 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

> On 2/6/20 1:36 AM, Vikram Sah wrote:
> > Dear sir/mam,
> >
> > I want to integrate PostgreSQL database to entity framework in asp.net
> > <http://asp.net; using database first approach. but when try to add
> > function then error occurred:
> >
> > *Error 6046: Unable to generate function import return type of the store
> > function.*
>
> This really a question for the EntityFramework maintainers/users. Still
> I did find this:
>
>
> https://stackoverflow.com/questions/24161005/error-6046-unable-to-generate-function-import-return-ty...
>
>
>
> >
> > I have following configuration:
> >
> > PostgreSQL 11.6,
> > npgsql v.4.0.9.0,
> > EntityFramework6.Npgsql 3.2.1.1,
> > in .net framework 4.5.2
> >
> > *My function in postgresql database is :*
> >
> > CREATE OR REPLACE FUNCTION dbo.EmployeeDetail ()
> > RETURNS TABLE (
> > emp_name VARCHAR,
> > emp_Id UUID
> > )
> > AS $$
> > BEGIN
> > RETURN QUERY SELECT
> > "EmployeName",
> > "EmployeeID"
> > FROM
> > dbo.Employee;
> > END; $$
> >
> > LANGUAGE 'plpgsql';
> >
> >
> > Can you pls help! I did more researches but no luck.
> >
> >
> > Thanks!
> >
> >
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Function not imported in Entity Framework
@ 2020-02-11 16:27  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Vikram Sah <rblucky3@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Adrian Klaver @ 2020-02-11 16:27 UTC (permalink / raw)
  To: Vikram Sah <rblucky3@gmail.com>; +Cc: pgsql-general

On 2/11/20 3:56 AM, Vikram Sah wrote:
> Thank you so much sir, but it didn't work for me as the database 
> function in PostgreSQL and EntityFramework6.Npgsql  is used as provider 
> for entity framework.

I have no idea where to go from here. Your best bet would be to reach 
out to the EntityFramework6.Npgsql community

> 
> Thanks!
> Vikram
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Function not imported in Entity Framework
@ 2020-02-11 16:35  Vikram Sah <rblucky3@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Vikram Sah @ 2020-02-11 16:35 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general

Got it sir, but unfortunately they have not provided any solution for the
last 5 days.

Thanks


On Tue, 11 Feb 2020, 10:12 pm Adrian Klaver, <adrian.klaver@aklaver.com>
wrote:

> On 2/11/20 3:56 AM, Vikram Sah wrote:
> > Thank you so much sir, but it didn't work for me as the database
> > function in PostgreSQL and EntityFramework6.Npgsql  is used as provider
> > for entity framework.
>
> I have no idea where to go from here. Your best bet would be to reach
> out to the EntityFramework6.Npgsql community
>
> >
> > Thanks!
> > Vikram
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Function not imported in Entity Framework
@ 2020-02-11 16:45  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Vikram Sah <rblucky3@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Adrian Klaver @ 2020-02-11 16:45 UTC (permalink / raw)
  To: Vikram Sah <rblucky3@gmail.com>; +Cc: pgsql-general

On 2/11/20 8:35 AM, Vikram Sah wrote:
> Got it sir, but unfortunately they have not provided any solution for 
> the last 5 days.

Where have you asked besides here?

> 
> Thanks
> 
> On Tue, 11 Feb 2020, 10:12 pm Adrian Klaver, <adrian.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.com>> wrote:
> 
>     On 2/11/20 3:56 AM, Vikram Sah wrote:
>      > Thank you so much sir, but it didn't work for me as the database
>      > function in PostgreSQL and EntityFramework6.Npgsql  is used as
>     provider
>      > for entity framework.
> 
>     I have no idea where to go from here. Your best bet would be to reach
>     out to the EntityFramework6.Npgsql community
> 
>      >
>      > Thanks!
>      > Vikram
>      >
> 
> 
>     -- 
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Function not imported in Entity Framework
@ 2020-02-12 01:17  Vikram Sah <rblucky3@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Vikram Sah @ 2020-02-12 01:17 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general

Sir,
I asked this in npgsql community who have developed *"EntityFramework6.Npgsql"
, *link is :
 https://github.com/npgsql/npgsql/issues/948. and developer named  *Shay
Rojansky *aka *roji* has replied as below image:
[image: @roji]

On Tue, Feb 11, 2020 at 10:30 PM Adrian Klaver <adrian.klaver@aklaver.com>
wrote:

> On 2/11/20 8:35 AM, Vikram Sah wrote:
> > Got it sir, but unfortunately they have not provided any solution for
> > the last 5 days.
>
> Where have you asked besides here?
>
> >
> > Thanks
> >
> > On Tue, 11 Feb 2020, 10:12 pm Adrian Klaver, <adrian.klaver@aklaver.com
> > <mailto:adrian.klaver@aklaver.com>> wrote:
> >
> >     On 2/11/20 3:56 AM, Vikram Sah wrote:
> >      > Thank you so much sir, but it didn't work for me as the database
> >      > function in PostgreSQL and EntityFramework6.Npgsql  is used as
> >     provider
> >      > for entity framework.
> >
> >     I have no idea where to go from here. Your best bet would be to reach
> >     out to the EntityFramework6.Npgsql community
> >
> >      >
> >      > Thanks!
> >      > Vikram
> >      >
> >
> >
> >     --
> >     Adrian Klaver
> >     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

Attachments:

FunctionNotimported.PNG (image/png, 63.5K) download view image
^ permalink raw reply [nested|flat] 9+ messages in thread

* RE: Function not imported in Entity Framework
@ 2020-02-12 11:52  farjad.farid <farjad.farid@checknetworks.com>
  parent: Vikram Sah <rblucky3@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: farjad.farid @ 2020-02-12 11:52 UTC (permalink / raw)
  To: Vikram Sah <rblucky3@gmail.com>; Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general

Thanks for highlighting this issue.

I have tested this using .net 4.8 and Core 3.1 against Sql Server, they all exhibit the same problem.

The best course of action is probably to identify a workaround, based on your project, until Microsoft team have the time to fix the issue.
It would be good idea to report this to Microsoft.



From: Vikram Sah <rblucky3@gmail.com>
Sent: 2020 February 12 01:18
To: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Function not imported in Entity Framework

Sir,
I asked this in npgsql community who have developed "EntityFramework6.Npgsql" , link is :
 https://github.com/npgsql/npgsql/issues/948. and developer named  Shay Rojansky aka roji has replied as below image:
[@roji]

On Tue, Feb 11, 2020 at 10:30 PM Adrian Klaver <adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>> wrote:
On 2/11/20 8:35 AM, Vikram Sah wrote:
> Got it sir, but unfortunately they have not provided any solution for
> the last 5 days.

Where have you asked besides here?

>
> Thanks
>
> On Tue, 11 Feb 2020, 10:12 pm Adrian Klaver, <adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>
> <mailto:adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>>> wrote:
>
>     On 2/11/20 3:56 AM, Vikram Sah wrote:
>      > Thank you so much sir, but it didn't work for me as the database
>      > function in PostgreSQL and EntityFramework6.Npgsql  is used as
>     provider
>      > for entity framework.
>
>     I have no idea where to go from here. Your best bet would be to reach
>     out to the EntityFramework6.Npgsql community
>
>      >
>      > Thanks!
>      > Vikram
>      >
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com> <mailto:adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>>
>


--
Adrian Klaver
adrian.klaver@aklaver.com<mailto:adrian.klaver@aklaver.com>


^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Function not imported in Entity Framework
@ 2020-02-13 01:12  Vikram Sah <rblucky3@gmail.com>
  parent: farjad.farid <farjad.farid@checknetworks.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Vikram Sah @ 2020-02-13 01:12 UTC (permalink / raw)
  To: farjad.farid <farjad.farid@checknetworks.com>; +Cc: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general

Thanks for your prompt response sir,.
For now We have decided to use Dapper ORM by considering the future
changes.

I surely look for you guidelines in coming future.

*Thank you so much again for clearing my confusion.*

Best regards
Ravi


On Wed, Feb 12, 2020 at 5:37 PM farjad.farid <farjad.farid@checknetworks.com>
wrote:

> Thanks for highlighting this issue.
>
>
>
> I have tested this using .net 4.8 and Core 3.1 against Sql Server, they
> all exhibit the same problem.
>
>
>
> The best course of action is probably to identify a workaround, based on
> your project, until Microsoft team have the time to fix the issue.
> It would be good idea to report this to Microsoft.
>
>
>
>
>
>
>
> *From:* Vikram Sah <rblucky3@gmail.com>
> *Sent:* 2020 February 12 01:18
> *To:* Adrian Klaver <adrian.klaver@aklaver.com>
> *Cc:* pgsql-general@postgresql.org
> *Subject:* Re: Function not imported in Entity Framework
>
>
>
> Sir,
>
> I asked this in npgsql community who have developed *"**EntityFramework6.Npgsql"
> , *link is :
>
>  https://github.com/npgsql/npgsql/issues/948. and developer named  *Shay
> Rojansky *aka *roji* has replied as below image:
>
> [image: @roji]
>
>
>
> On Tue, Feb 11, 2020 at 10:30 PM Adrian Klaver <adrian.klaver@aklaver.com>
> wrote:
>
> On 2/11/20 8:35 AM, Vikram Sah wrote:
> > Got it sir, but unfortunately they have not provided any solution for
> > the last 5 days.
>
> Where have you asked besides here?
>
> >
> > Thanks
> >
> > On Tue, 11 Feb 2020, 10:12 pm Adrian Klaver, <adrian.klaver@aklaver.com
> > <mailto:adrian.klaver@aklaver.com>> wrote:
> >
> >     On 2/11/20 3:56 AM, Vikram Sah wrote:
> >      > Thank you so much sir, but it didn't work for me as the database
> >      > function in PostgreSQL and EntityFramework6.Npgsql  is used as
> >     provider
> >      > for entity framework.
> >
> >     I have no idea where to go from here. Your best bet would be to reach
> >     out to the EntityFramework6.Npgsql community
> >
> >      >
> >      > Thanks!
> >      > Vikram
> >      >
> >
> >
> >     --
> >     Adrian Klaver
> >     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> >
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>

^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2020-02-13 01:12 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 09:36 Function not imported in Entity Framework Vikram Sah <rblucky3@gmail.com>
2020-02-06 15:38 ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-02-11 11:56   ` Vikram Sah <rblucky3@gmail.com>
2020-02-11 16:27     ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-02-11 16:35       ` Vikram Sah <rblucky3@gmail.com>
2020-02-11 16:45         ` Adrian Klaver <adrian.klaver@aklaver.com>
2020-02-12 01:17           ` Vikram Sah <rblucky3@gmail.com>
2020-02-12 11:52             ` farjad.farid <farjad.farid@checknetworks.com>
2020-02-13 01:12               ` Vikram Sah <rblucky3@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox