Environment: vwd 2013, project template : hot towel angular 1.3, breeze, entity-framework ado .net 6.0, sql server 2012 express, breeze web.api2.
I 've developped a spa web site with these technologies. Everything works fine, except when I do a $window.location.reload(), it seems to empty the metadatastore of breeze, and the first page displayed after the reload() is not correctly bound (not bound at all).
I would like to know if it's possible to handle the metadatastore, ideally at the instanciation of the entityManager of breeze, from the client-side.
For the moment, the metadatastore is handled automatically, fed from the Metadata method of the BreezeController on the server-side.
On debug mode, I can see that the Metadata method, is often called, maybe too often.
After searching in the sources of the web app, I can see in breeze.debug.js, the function ctor.prototype.fetchMetadata = function (metadataStore, dataService) calling the Metadata method. This fetchMetadata function seems to be called from breeze.angular.q.js.
I wouldn't like to touch to these javascript.
I would like to do this (is this possible ?):
- deactivate the Metadata method of the BreezeController.
- Write a GetMetadata method in the BreezeController, doing the same thing that Metadata.
- Call this new method GetMetadata on the client-side when I do a new breezeEntityManager.
Without modifying the javascripts given with the poject template hot towel angular, is it possible ?
Thanx for your help.