1
votes

I want to create a Single Page App using Microsoft MVC4 and AngularJS. I already saw and test some of the examples provided here http://www.asp.net/single-page-application/overview/templates.

BreezeJS get my attention, he provides some nice data manipulation features on client side, but when it comes to the saving changes and storing data into DB, Breeze insists on Entity Framework. Or at least I have that impression and I can't find an example or explanation how to use Breeze without EF (NodeJS is not solution for this one).

I would like to know is it possible to save changes using Breeze saveChanges method with out Entity Framework and how?

I guess that the JObject which is sent from Breeze and received by MVC4 Controller (or Web API) need to be handled "manually" looking to extract next information:

  • what kind of change is happened - looking at "entityState" (Added, Modified, Deleted)
  • out which one of entities is changed - looking at "entityTypeName"
  • extract and convert entity attribute values to the right class properties or variables (or not)
  • and then create appropriate objects and action/s for some DB layer or even to create appropriate queries

This kind of approach asking to have a lot of work for creating metadata (specially for bigger number of tables) which probably will take a lot of time.

Any kind of help would be useful. Thanks.

1
Do you plan on using ASP.NET MVC 4 or are you looking at other technologies?PW Kad
Yes I'm planing to use MVC4 and want to create SPA using Angular JS. So I was thinking to use MVC4 for creating index page and WEB APIs for communication with SPA.Mladen

1 Answers

0
votes

I Hope I understood your question. The way i see it breeze can track changes regardles of entity framework (EntityAspect). http://www.breezejs.com/documentation/change-tracking

What happens in the controller on your servers web API has no effect on how your SPA works. so you can use any persistence model you like. If you don't use EF you have to create a MetadataStore client side, but this is fairly easy.

Regards,

Ian