Breeze / breeze.js

Breeze for JavaScript clients
MIT License
537 stars 88 forks source link

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

Open Davidvlv opened 7 years ago

Davidvlv commented 7 years ago

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 commented 7 years ago

.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 commented 7 years ago

any time line

senseiweb commented 7 years ago

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

jtraband commented 7 years ago

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 commented 7 years ago

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

badre429 commented 7 years ago

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

jtraband commented 7 years ago

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

steveschmitt commented 7 years ago

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

jtraband commented 7 years ago

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 commented 7 years ago

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

senseiweb commented 7 years ago

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

badre429 commented 7 years ago

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

jtraband commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

@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 commented 7 years ago

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

Thanks

nigel-dewar commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

nebffa commented 7 years ago

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 commented 7 years ago

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

Cheers.

marcelgood commented 7 years ago

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

nigel-dewar commented 7 years ago

No worries mate, understand.

Ill have another dig in the tests folder in the core repo and see if I can dig out the specifics I need.

Cheers

Nige


From: Marcel Good notifications@github.com Sent: Friday, 19 May 2017 6:32 p.m. To: Breeze/breeze.js Cc: nigel-dewar; Mention Subject: Re: [Breeze/breeze.js] Question: Breeze with .NET Core, EF Core (#178)

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Breeze/breeze.js/issues/178#issuecomment-302620841, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AI94WBW5PkpmyGnPrbU4Bw9yet6HeuMtks5r7TdygaJpZM4LKJ-h.

markarnolditpro commented 7 years ago

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 commented 7 years ago

Yo Mark, breeze team already have it, we just waiting on a sample/starter repo.

Sent from Samsung Mobile

-------- Original message -------- From: Mark Date:14/06/2017 05:39 (GMT+10:00) To: "Breeze/breeze.js" Cc: nigel-dewar , Mention Subject: Re: [Breeze/breeze.js] Question: Breeze with .NET Core, EF Core (#178)

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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Breeze/breeze.js/issues/178#issuecomment-308225542, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AI94WF9t23HAc-Wa0-uRV-SLME62Ui5Oks5sDuVTgaJpZM4LKJ-h.

markarnolditpro commented 7 years ago

My understanding is that what's available now is support for ASP.Net Core compiled against .Net Framework and EF 6.


From: nigel-dewar notifications@github.com<mailto:notifications@github.com> Sent: Tuesday, June 13, 2017 4:12 PM Subject: Re: [Breeze/breeze.js] Question: Breeze with .NET Core, EF Core (#178) To: Breeze/breeze.js breeze.js@noreply.github.com<mailto:breeze.js@noreply.github.com> Cc: Mark markarnolditpro@gmail.com<mailto:markarnolditpro@gmail.com>, Comment comment@noreply.github.com<mailto:comment@noreply.github.com>

Yo Mark, breeze team already have it, we just waiting on a sample/starter repo.

Sent from Samsung Mobile

-------- Original message -------- From: Mark Date:14/06/2017 05:39 (GMT+10:00) To: "Breeze/breeze.js" Cc: nigel-dewar , Mention Subject: Re: [Breeze/breeze.js] Question: Breeze with .NET Core, EF Core (#178)

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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Breeze/breeze.js/issues/178#issuecomment-308225542, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AI94WF9t23HAc-Wa0-uRV-SLME62Ui5Oks5sDuVTgaJpZM4LKJ-h.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Breeze/breeze.js/issues/178#issuecomment-308234319, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKdfKxgzmTZk6Bbg8EA2XrJbDdCx1sGtks5sDu1BgaJpZM4LKJ-h.

nigel-dewar commented 7 years ago

Hahaha true that!

Sent from Samsung Mobile

-------- Original message -------- From: Mark Date:14/06/2017 06:36 (GMT+10:00) To: "Breeze/breeze.js" Cc: nigel-dewar , Mention Subject: Re: [Breeze/breeze.js] Question: Breeze with .NET Core, EF Core (#178)

My understanding is that what's available now is support for http://as.net http://asp.net http://asp.net http://asp.net http://asp.net http://asp.net Ahttp://asp.netsphttp://asp.nethttp://asp.nethttp://asp.nethttp://asp.nethttp://asp.nethttp://asp.net.Nethttp://asp.net Core compiled against .Net Framework and EF 6.


From: nigel-dewar notifications@github.com<mailto:notifications@github.com> Sent: Tuesday, June 13, 2017 4:12 PM Subject: Re: [Breeze/breeze.js] Question: Breeze with .NET Core, EF Core (#178) To: Breeze/breeze.js breeze.js@noreply.github.com<mailto:breeze.js@noreply.github.com> Cc: Mark markarnolditpro@gmail.com<mailto:markarnolditpro@gmail.com>, Comment comment@noreply.github.com<mailto:comment@noreply.github.com>

Yo Mark, breeze team already have it, we just waiting on a sample/starter repo.

Sent from Samsung Mobile

-------- Original message -------- From: Mark Date:14/06/2017 05:39 (GMT+10:00) To: "Breeze/breeze.js" Cc: nigel-dewar , Mention Subject: Re: [Breeze/breeze.js] Question: Breeze with .NET Core, EF Core (#178)

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?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Breeze/breeze.js/issues/178#issuecomment-308225542, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AI94WF9t23HAc-Wa0-uRV-SLME62Ui5Oks5sDuVTgaJpZM4LKJ-h.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Breeze/breeze.js/issues/178#issuecomment-308234319, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKdfKxgzmTZk6Bbg8EA2XrJbDdCx1sGtks5sDu1BgaJpZM4LKJ-h.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Breeze/breeze.js/issues/178#issuecomment-308240655, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AI94WJUwo4xOZiauSH9oPsXUpJgj7CSwks5sDvKrgaJpZM4LKJ-h.

bnemetchek commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

@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 commented 7 years ago

Yo @ganySA ,

Im up and running with breeze and .net core. Just follow instructions found here https://github.com/Breeze/breeze.server.net/issues/58 and you will be sweeeeeet!

josundt commented 6 years ago

Any news on EFCore 2.0 support?

mikemichaelis commented 6 years ago

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 commented 5 years ago

@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 commented 5 years ago

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