Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Breeze with .NET Core, EF Core #178

Open
Davidvlv opened this issue Dec 12, 2016 · 42 comments
Open

Question: Breeze with .NET Core, EF Core #178

Davidvlv opened this issue Dec 12, 2016 · 42 comments

Comments

@Davidvlv
Copy link

Hi,

I'm trying to use Breeze with ASP.NET Core and Entity Framework Core, is this supported?
Or can I use Breeze with .NET Core and EF 6?

Thanks

@steveschmitt
Copy link
Member

.NET Core + EF6 support is in progress (should be in beta by end of February). EF Core will come later, as it is still missing a few features.

@badre429
Copy link

any time line

@senseiweb
Copy link

Doing a pulse check...any update on the beta

@jtraband
Copy link
Contributor

jtraband commented Mar 8, 2017

I will be putting out a beta later this week of ASP .NET Core + EF6. Got it working now, just packaging it into nugets.

@nigel-dewar
Copy link

Im super excited to have a play with the beta. Awesome work

@badre429
Copy link

badre429 commented Mar 9, 2017

@nigel-dewar where is it
i can't find a build on nuget ?

@jtraband
Copy link
Contributor

jtraband commented Mar 9, 2017

I haven't released it yet. Working on it now.

@steveschmitt
Copy link
Member

Not on nuget yet. If you want to try it right now, you will need to download and build it yourself.

@jtraband
Copy link
Contributor

jtraband commented Mar 9, 2017

Ok, new nugets to support ASP.NET core and EF6 are now available. I am still working on samples to show how this all works but if you want to try without them... The nugets are Breeze.Server.Core, Breeze.Server.Persistence, Breeze.Server.Persistence.EF6 and Breeze.Server.AspNetCore.NetFramework as well as a composite nuget ( which is the easiest to use) called Breeze.Composite.AspNetCore.EF6. If you want to see an example solution , take a look at the Breeze.AspNetCore,InternalTest.sln in the breeze.server.net repo. (This solution is really only intended for internal use and has a number of specific dependencies that may not be obvious so I would just use this to look at the asp.net core setup.)

All of our internals tests work with these new dlls, the only caveat is that you will need to configure the breeze client to use the 'json' uri builder.

breeze.core.config.initializeAdapterInstance("uriBuilder", "json");

These new assemblies no longer have any dependencies on OData ( but still provide all of the same functionality) and there is no need for any client side OData javascript libraries either, assuming you set the adapter as shown above.

Hope this helps.

@nigel-dewar
Copy link

Awesome work mate I'm going to give this a crack today! Thanks for all your work!

@senseiweb
Copy link

senseiweb commented Mar 9, 2017

I definitely second that -- thanks for the hard work guys!!

@badre429
Copy link

Finaly its on nuget
thank you and can't wait for ef.core support

@jtraband
Copy link
Contributor

We would be willing to do EF core now, if it wasn't currently so constrained. Many of the most useful parts of EF6 are not yet available in EF Core. We do plan to add support once many of these are in place. MS has a roadmap of these improvements, but no definite timetable yet. And they have even said that for most scenarios that you should probably stick with EF6 until these are released.

@khuzemakanore
Copy link

When I install Breeze.Composite.AspNetCore.NetFramework in .NetCore WebApi project. Its gives me error Package EntityFramework 6.0.0 is not compatible with netcoreapp1.1.

Any solution ?

Thanks

@jtraband
Copy link
Contributor

jtraband commented Mar 21, 2017

Note sure if this is the issue, but there are two versions of 'ASP.NET core'. One based on the full .NET Framework and the other based just on .NET core. The 'Breeze.Composite.AspNetCore.NetFramework' needs the version that is based on the full .NET Framework. (Hence the .NetFramework suffix). We will be doing a 'Breeze.Composite.AspNetCore.NetCore' lib once MS makes more progress on EF Core, which does not yet support many of the features that Breeze supports. MS has committed to these changes but no timetable yet.

@badre429
Copy link

badre429 commented Mar 21, 2017

@khuzemakanore your project is targeting dotnet core 1.1 you have to torget the full framework in order to user EF 6
therefore you have to change *.csproj
you have to replace

 <PropertyGroup>
     <TargetFramework>netcoreapp1.1</TargetFramework> 
  </PropertyGroup>

by

 <PropertyGroup>
     <TargetFramework>net461</TargetFramework>
    <RuntimeIdentifier>win7-x64</RuntimeIdentifier>
  </PropertyGroup>

@khuzemakanore
Copy link

The 'Breeze.Composite.AspNetCore.NetFramework' needs the version that is based on the full .NET Framework. (Hence the .NetFramework suffix).

Thanks. Yes its works with the full .Net Framework version.

@bnemetchek
Copy link

With this new implementation, where oData is not longer required, would it be possible to configure that regular queries are sent with a POST instead of a GET?

@marcelgood
Copy link
Contributor

@bnemetchek That's been possible all along. The support for POST is not part of Breeze out of the box, but can be added via breeze.ajaxpost.js from Breeze Labs. Play the script after Breeze or import it and see the comments at the top for how to send a query with a POST.

https://github.com/Breeze/breeze.js.labs/blob/master/breeze.ajaxpost.js

@bnemetchek
Copy link

marcelgood, thanks, I'm familiar with that and use it for several custom queries. However, what I'm asking about is whether breeze filter queries can be sent with POST vs GET. i.e., oData filter queries

@marcelgood
Copy link
Contributor

@bnemetchek The same mechanism should work for any query. Breeze won't put the query arguments in the body, though, they will still be part of the URL.

@bnemetchek
Copy link

@marcelgood. I understand that. My dilemma is that I occasionally have very long URL's. My solution is likely to refactor. It would be convenient, perhaps in the future, to have some mechanism whereby they queries were send as POST parms and interpreted on the server as an oData filter.

I apologize for hijacking this thread. I'll stop now. :)

@WisdomCorp
Copy link

Can we have a sample project or skeleton project to start with Asp.Net Core

Thanks

@nigel-dewar
Copy link

nigel-dewar commented Apr 23, 2017

Really do need a basic asp.net core sample please. Even if just very very basic. And even if using the full .net framework is fine, just need something to see how the bits fit together.

Had another look in tests, and just too much stuff in there to know where to start.

Please.

@marcelgood
Copy link
Contributor

I'm getting started on adding an asp.net core back-end to the temphire.angular sample, but I can't give you a timeframe yet.

@nigel-dewar
Copy link

Oh sweet Marcel, cheers mate looking forward to it. Really appreciate it, i know you guys are real busy with alot on.

@nebffa
Copy link

nebffa commented Apr 29, 2017

I'd like to add my voice to those requesting an ASP.NET core sample - Breeze is great and I'd like to use it with a couple of ASP.NET core projects at work.

@nigel-dewar
Copy link

Yo YO, just pinging to see if any movement on this?

Cheers.

@marcelgood
Copy link
Contributor

Unfortunately, we've been busy with consulting projects. I'm still trying to get to it.

@nigel-dewar
Copy link

nigel-dewar commented May 20, 2017 via email

@markarnolditpro
Copy link

With the release of EF Core 2 Preview at Build does it look like you've got the features you need to begin work on EF Core support?

@nigel-dewar
Copy link

nigel-dewar commented Jun 13, 2017 via email

@markarnolditpro
Copy link

markarnolditpro commented Jun 13, 2017 via email

@nigel-dewar
Copy link

nigel-dewar commented Jun 13, 2017 via email

@bnemetchek
Copy link

bnemetchek commented Jun 14, 2017

I am attempting to test this new functionality as per the instructions. It would seem that the where clause can no longer include oData functions as per [http://breeze.github.io/doc-js/api-docs/classes/EntityQuery.html#method_where]

@christophwille
Copy link

EF Core vs ASP.NET Core + EF6 is intermixed in this thread, but seems that the "no to EF Core" in the first reply by @steveschmitt was for 1.1, and the post on EF Core 2 Preview didn't garner any replies - so, would EF Core 2 be fit for Breeze Server? Or is it still not good enough?

@ganySA
Copy link

ganySA commented Aug 14, 2017

@marcelgood hope you are well...

Just a quick question is there a working version of Breeze + EF on .net core 1.1 the thread is a bit confusing... referring to .net 4.6

What packages need to be installed? or is it still WIP

Thanks.

@nigel-dewar
Copy link

Yo @ganySA ,

Im up and running with breeze and .net core. Just follow instructions found here Breeze/breeze.server.net#58 and you will be sweeeeeet!

@josundt
Copy link

josundt commented Nov 24, 2017

Any news on EFCore 2.0 support?

@mikemichaelis
Copy link

I have all of this working in dotnet core 2.0.....ef core + webapi core + breezejs core + dotnet-cli + ef-cli

https://github.com/mikemichaelis/dnc

My persistence layer is SQL Server 2017 running in a Linux Docker container. See ya Windows........

@plwade
Copy link

plwade commented Nov 27, 2018

@marcelgood Can you point me in the direction of the temphire angular sample working with the asp.net core back-end?
Any help appreciated

I'm getting started on adding an asp.net core back-end to the temphire.angular sample, but I can't give you a timeframe yet.

@plwade
Copy link

plwade commented Nov 27, 2018

I have all of this working in dotnet core 2.0.....ef core + webapi core + breezejs core + dotnet-cli + ef-cli

https://github.com/mikemichaelis/dnc

My persistence layer is SQL Server 2017 running in a Linux Docker container. See ya Windows........

@mikemichaelis I can't seem to get your dnc backend working with my Angular/Breeze app. Have you got a sample app you could share?
Thank You

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests