Thread: Asp.net 5 and EF6

Asp.net 5 and EF6

From
"FarjadFarid\(ChkNet\)"
Date:

 

Hi I am trying to use certain features of Asp.net 5 using postgresql using EF6.

 

I have downloaded the latest unstable version of npgsql and tried to connect to my db.

But no luck.

 

I have posted a request to stackoverflow.com but haven’t had any response at all.

 

It is easy to connect to Sql Server using EF6 under asp.net 5.

 

So I would have thought as an interim measure until EF7 is ready which will be quite some time to come,

it should be possible to connect to postgresql using EF6.

 

Any ideas how?

 

Many thanks.

Re: Asp.net 5 and EF6

From
Adrian Klaver
Date:
On 02/04/2016 08:46 AM, FarjadFarid(ChkNet) wrote:
> Hi I am trying to use certain features of Asp.net 5 using postgresql
> using EF6.
>
> I have downloaded the latest unstable version of npgsql and tried to
> connect to my db.
>
> But no luck.
I am not a nppsql user, so some generic question.

Can you explain in more detail what the errors are?

>
> I have posted a request to stackoverflow.com but haven’t had any
> response at all.
>
> It is easy to connect to Sql Server using EF6 under asp.net 5.
>
> So I would have thought as an interim measure until EF7 is ready which
> will be quite some time to come,
>
> it should be possible to connect to postgresql using EF6.

Have you looked here?:

http://www.npgsql.org/doc/ef6.html

>
> Any ideas how?
>
> Many thanks.
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Asp.net 5 and EF6

From
"FarjadFarid\(ChkNet\)"
Date:
I have looked the Npgsql website and downloaded the EF7 files. Of course the
full .net core.

The problem *seems* to be that there are two separate libraries that need to
be added.

One is EF related and the other is the Npgsql wrapper.
Unfortunately the Nuget installer is not working correctly either.

The main error seems to be in the submitted version of the libraries and
build version.

The error is
NU1007 Dependency specified was EntityFramework7.Npgsql >=1.0.0 but ended
with EntityFramework7.Npgsql 1.0.0

Npgsql namespace is installed but not the entity framework.

It looks as if EF7 will be released much later than asp.net 5. So a lot of
time could be lost in the middle.

Current suggested workaround for all DB's solution is to use EF6 under a
separate .net project.

Any suggestion?

-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
Sent: 04 February 2016 17:00
To: FarjadFarid(ChkNet); pgsql-general@postgresql.org
Subject: Re: [GENERAL] Asp.net 5 and EF6

On 02/04/2016 08:46 AM, FarjadFarid(ChkNet) wrote:
> Hi I am trying to use certain features of Asp.net 5 using postgresql
> using EF6.
>
> I have downloaded the latest unstable version of npgsql and tried to
> connect to my db.
>
> But no luck.
I am not a nppsql user, so some generic question.

Can you explain in more detail what the errors are?

>
> I have posted a request to stackoverflow.com but haven't had any
> response at all.
>
> It is easy to connect to Sql Server using EF6 under asp.net 5.
>
> So I would have thought as an interim measure until EF7 is ready which
> will be quite some time to come,
>
> it should be possible to connect to postgresql using EF6.

Have you looked here?:

http://www.npgsql.org/doc/ef6.html

>
> Any ideas how?
>
> Many thanks.
>


--
Adrian Klaver
adrian.klaver@aklaver.com



Re: Asp.net 5 and EF6

From
Adrian Klaver
Date:
On 02/04/2016 09:18 AM, FarjadFarid(ChkNet) wrote:
> I have looked the Npgsql website and downloaded the EF7 files. Of course the
> full .net core.

Alright now I am not following, in your original post you said:

"Hi I am trying to use certain features of Asp.net 5 using postgresql
using EF6."

and

"So I would have thought as an interim measure until EF7 is ready which
will be quite some time to come, it should be possible to connect to
postgresql using EF6. "

So why are you using the EF7 files?

>
> The problem *seems* to be that there are two separate libraries that need to
> be added.
>
> One is EF related and the other is the Npgsql wrapper.
> Unfortunately the Nuget installer is not working correctly either.
>
> The main error seems to be in the submitted version of the libraries and
> build version.
>
> The error is
> NU1007 Dependency specified was EntityFramework7.Npgsql >=1.0.0 but ended
> with EntityFramework7.Npgsql 1.0.0
>
> Npgsql namespace is installed but not the entity framework.
>
> It looks as if EF7 will be released much later than asp.net 5. So a lot of
> time could be lost in the middle.
>
> Current suggested workaround for all DB's solution is to use EF6 under a
> separate .net project.
>
> Any suggestion?
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
> Sent: 04 February 2016 17:00
> To: FarjadFarid(ChkNet); pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Asp.net 5 and EF6
>
> On 02/04/2016 08:46 AM, FarjadFarid(ChkNet) wrote:
>> Hi I am trying to use certain features of Asp.net 5 using postgresql
>> using EF6.
>>
>> I have downloaded the latest unstable version of npgsql and tried to
>> connect to my db.
>>
>> But no luck.
> I am not a nppsql user, so some generic question.
>
> Can you explain in more detail what the errors are?
>
>>
>> I have posted a request to stackoverflow.com but haven't had any
>> response at all.
>>
>> It is easy to connect to Sql Server using EF6 under asp.net 5.
>>
>> So I would have thought as an interim measure until EF7 is ready which
>> will be quite some time to come,
>>
>> it should be possible to connect to postgresql using EF6.
>
> Have you looked here?:
>
> http://www.npgsql.org/doc/ef6.html
>
>>
>> Any ideas how?
>>
>> Many thanks.
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Asp.net 5 and EF6

From
"FarjadFarid\(ChkNet\)"
Date:
I am not using EF7. It is actually EF6 under full .net 5


-----Original Message-----
From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
Sent: 04 February 2016 17:29
To: FarjadFarid(ChkNet); pgsql-general@postgresql.org
Subject: Re: [GENERAL] Asp.net 5 and EF6

On 02/04/2016 09:18 AM, FarjadFarid(ChkNet) wrote:
> I have looked the Npgsql website and downloaded the EF7 files. Of
> course the full .net core.

Alright now I am not following, in your original post you said:

"Hi I am trying to use certain features of Asp.net 5 using postgresql using
EF6."

and

"So I would have thought as an interim measure until EF7 is ready which will
be quite some time to come, it should be possible to connect to postgresql
using EF6. "

So why are you using the EF7 files?

>
> The problem *seems* to be that there are two separate libraries that
> need to be added.
>
> One is EF related and the other is the Npgsql wrapper.
> Unfortunately the Nuget installer is not working correctly either.
>
> The main error seems to be in the submitted version of the libraries
> and build version.
>
> The error is
> NU1007 Dependency specified was EntityFramework7.Npgsql >=1.0.0 but
> ended with EntityFramework7.Npgsql 1.0.0
>
> Npgsql namespace is installed but not the entity framework.
>
> It looks as if EF7 will be released much later than asp.net 5. So a
> lot of time could be lost in the middle.
>
> Current suggested workaround for all DB's solution is to use EF6 under
> a separate .net project.
>
> Any suggestion?
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
> Sent: 04 February 2016 17:00
> To: FarjadFarid(ChkNet); pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Asp.net 5 and EF6
>
> On 02/04/2016 08:46 AM, FarjadFarid(ChkNet) wrote:
>> Hi I am trying to use certain features of Asp.net 5 using postgresql
>> using EF6.
>>
>> I have downloaded the latest unstable version of npgsql and tried to
>> connect to my db.
>>
>> But no luck.
> I am not a nppsql user, so some generic question.
>
> Can you explain in more detail what the errors are?
>
>>
>> I have posted a request to stackoverflow.com but haven't had any
>> response at all.
>>
>> It is easy to connect to Sql Server using EF6 under asp.net 5.
>>
>> So I would have thought as an interim measure until EF7 is ready
>> which will be quite some time to come,
>>
>> it should be possible to connect to postgresql using EF6.
>
> Have you looked here?:
>
> http://www.npgsql.org/doc/ef6.html
>
>>
>> Any ideas how?
>>
>> Many thanks.
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com



Re: Asp.net 5 and EF6

From
John R Pierce
Date:
On 2/4/2016 9:52 AM, FarjadFarid(ChkNet) wrote:
> I am not using EF7. It is actually EF6 under full .net 5

then why is the error...

> NU1007 Dependency specified was EntityFramework7.Npgsql >=1.0.0 but
> ended with EntityFramework7.Npgsql 1.0.0

??


--
john r pierce, recycling bits in santa cruz



Re: Asp.net 5 and EF6

From
Adrian Klaver
Date:
On 02/04/2016 09:52 AM, FarjadFarid(ChkNet) wrote:
>
> I am not using EF7. It is actually EF6 under full .net 5

Your previous post seemed to be referring to these instructions:

http://www.npgsql.org/doc/ef7.html

which would indicate you are using EF7, and as John pointed out, so does
the error message.

FYI there is an issue that is tracking EF7 support:

https://github.com/npgsql/npgsql/issues/249

>
>
> -----Original Message-----
> From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
> Sent: 04 February 2016 17:29
> To: FarjadFarid(ChkNet); pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Asp.net 5 and EF6
>
> On 02/04/2016 09:18 AM, FarjadFarid(ChkNet) wrote:
>> I have looked the Npgsql website and downloaded the EF7 files. Of
>> course the full .net core.
>
> Alright now I am not following, in your original post you said:
>
> "Hi I am trying to use certain features of Asp.net 5 using postgresql using
> EF6."
>
> and
>
> "So I would have thought as an interim measure until EF7 is ready which will
> be quite some time to come, it should be possible to connect to postgresql
> using EF6. "
>
> So why are you using the EF7 files?
>
>>
>> The problem *seems* to be that there are two separate libraries that
>> need to be added.
>>
>> One is EF related and the other is the Npgsql wrapper.
>> Unfortunately the Nuget installer is not working correctly either.
>>
>> The main error seems to be in the submitted version of the libraries
>> and build version.
>>
>> The error is
>> NU1007 Dependency specified was EntityFramework7.Npgsql >=1.0.0 but
>> ended with EntityFramework7.Npgsql 1.0.0
>>
>> Npgsql namespace is installed but not the entity framework.
>>
>> It looks as if EF7 will be released much later than asp.net 5. So a
>> lot of time could be lost in the middle.
>>
>> Current suggested workaround for all DB's solution is to use EF6 under
>> a separate .net project.
>>
>> Any suggestion?
>>
>> -----Original Message-----
>> From: Adrian Klaver [mailto:adrian.klaver@aklaver.com]
>> Sent: 04 February 2016 17:00
>> To: FarjadFarid(ChkNet); pgsql-general@postgresql.org
>> Subject: Re: [GENERAL] Asp.net 5 and EF6
>>
>> On 02/04/2016 08:46 AM, FarjadFarid(ChkNet) wrote:
>>> Hi I am trying to use certain features of Asp.net 5 using postgresql
>>> using EF6.
>>>
>>> I have downloaded the latest unstable version of npgsql and tried to
>>> connect to my db.
>>>
>>> But no luck.
>> I am not a nppsql user, so some generic question.
>>
>> Can you explain in more detail what the errors are?
>>
>>>
>>> I have posted a request to stackoverflow.com but haven't had any
>>> response at all.
>>>
>>> It is easy to connect to Sql Server using EF6 under asp.net 5.
>>>
>>> So I would have thought as an interim measure until EF7 is ready
>>> which will be quite some time to come,
>>>
>>> it should be possible to connect to postgresql using EF6.
>>
>> Have you looked here?:
>>
>> http://www.npgsql.org/doc/ef6.html
>>
>>>
>>> Any ideas how?
>>>
>>> Many thanks.
>>>
>>
>>
>> --
>> Adrian Klaver
>> adrian.klaver@aklaver.com
>>
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: Asp.net 5 and EF6

From
"FarjadFarid\(ChkNet\)"
Date:
It looks like builds versioning number but not sure if
anyone has tried asp.net 5 or not?

-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of John R Pierce
Sent: 04 February 2016 18:02
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Asp.net 5 and EF6

On 2/4/2016 9:52 AM, FarjadFarid(ChkNet) wrote:
> I am not using EF7. It is actually EF6 under full .net 5

then why is the error...

> NU1007 Dependency specified was EntityFramework7.Npgsql >=1.0.0 but
> ended with EntityFramework7.Npgsql 1.0.0

??


--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



Re: Asp.net 5 and EF6

From
John R Pierce
Date:
On 2/4/2016 2:34 PM, FarjadFarid(ChkNet) wrote:
> It looks like builds versioning number but not sure if
> anyone has tried asp.net 5 or not?


I personally don't use ASP.NET anything.  The people I know who do
develop software for .NET generally try and stay with the lowest common
denominator, so are mostly still at framework 3.5, so their software
runs on as many platforms as possible.   Enterprise deployments are
generally very leary of bleeding edge software.

--
john r pierce, recycling bits in santa cruz



Re: Asp.net 5 and EF6

From
Arjen Nienhuis
Date:
On Thu, Feb 4, 2016 at 5:46 PM, FarjadFarid(ChkNet)
<farjad.farid@checknetworks.com> wrote:
>
>
> Hi I am trying to use certain features of Asp.net 5 using postgresql using
> EF6.
>

I think you can use EF6, but not with .NET Core. It's possible to use
Aap.net 5 without .NET Core.

>
>
> I have downloaded the latest unstable version of npgsql and tried to connect
> to my db.

I think you can use the stable version. EF6 support is very stable.

>
> But no luck.
>
>
>
> I have posted a request to stackoverflow.com but haven’t had any response at
> all.
>
>
>
> It is easy to connect to Sql Server using EF6 under asp.net 5.
>
>
>
> So I would have thought as an interim measure until EF7 is ready which will
> be quite some time to come,
>
> it should be possible to connect to postgresql using EF6.
>
>
>
> Any ideas how?
>

Just use this dependency in your project.json and "restore packages":

  "dependencies": {
    "EntityFramework6.Npgsql": "3.0.5",
    ...
  }

The rest should be exactly the same as with SQL server.

>
>
> Many thanks.


Re: Asp.net 5 and EF6

From
"FarjadFarid\(ChkNet\)"
Date:
Hi Arjen,

Currently one can only add a reference to asp.net5 that is rebuilt with asp.net5 library.
In the case of  EF6 with full .net library and not the core.

The problem seems to be the build versioning of the npgsql library for the full .net library.

It is emitting one thing but expecting another.

At least this is one of the problems.



-----Original Message-----
From: Arjen Nienhuis [mailto:a.g.nienhuis@gmail.com]
Sent: 06 February 2016 16:53
To: FarjadFarid(ChkNet)
Cc: pgsql-general
Subject: Re: [GENERAL] Asp.net 5 and EF6

On Thu, Feb 4, 2016 at 5:46 PM, FarjadFarid(ChkNet) <farjad.farid@checknetworks.com> wrote:
>
>
> Hi I am trying to use certain features of Asp.net 5 using postgresql
> using EF6.
>

I think you can use EF6, but not with .NET Core. It's possible to use Aap.net 5 without .NET Core.

>
>
> I have downloaded the latest unstable version of npgsql and tried to
> connect to my db.

I think you can use the stable version. EF6 support is very stable.

>
> But no luck.
>
>
>
> I have posted a request to stackoverflow.com but haven’t had any
> response at all.
>
>
>
> It is easy to connect to Sql Server using EF6 under asp.net 5.
>
>
>
> So I would have thought as an interim measure until EF7 is ready which
> will be quite some time to come,
>
> it should be possible to connect to postgresql using EF6.
>
>
>
> Any ideas how?
>

Just use this dependency in your project.json and "restore packages":

  "dependencies": {
    "EntityFramework6.Npgsql": "3.0.5",
    ...
  }

The rest should be exactly the same as with SQL server.

>
>
> Many thanks.