breeze

Breeze importEntities

狂风中的少年 提交于 2019-12-12 01:26:58
问题 When my application loads, I am exporting few breeze entities and storing those in local cache so that later when I have to make use of those entities again, I import them back from local storage and execute the query locally. There is one entity that has 84389 rows. I have noticed that the importEntites take longer to execute for this entity. Is there a way I can speed up this ? var entities = manager.getEntities('Client'); var exportedEntity = manager.exportEntities(entities, {

A synchronous Breeze ExecuteQuery

こ雲淡風輕ζ 提交于 2019-12-12 01:08:23
问题 I get data form the DB like this using Breeze promise ExecuteQuery : var getdata = function(){ var manager = new breeze.EntityManager(serviceName); var query = new EntityQuery().from('MyTable'); manager.executeQuery(query) .then(function(data){ //line1 console.log('success'); }); //line2 console.log('end'); } Is there any way to make this function synchronous : not executing line2 untill line1 is done (or query failed) ? Thanks 回答1: No. Once a function is async there is no real way to make

breezejs createEntity is undefined

与世无争的帅哥 提交于 2019-12-12 01:01:33
问题 Inside an AngularJS directive, I assign a new value to a scope variable: $scope.myPerson = { TiersId: 105191, Name: "John Smith" }; Originaly the $scope.myPerson was created from a BreezeJS entity. Assigning the new value triggers a $scope.apply() by AngularJS, which is then intercepted by BreezeJS. That's when it gets complicated. [EDIT] Ok, I've figured out that I need to use the EntityManager that I've registered with my dataContext: $scope.myPerson = myDataContext.createPerson({ TiersId:

BreezeJS Selecting ComplexType properties

北城余情 提交于 2019-12-12 00:35:13
问题 I am running into an issue with Breeze and Durandal which is leading me to believe it may be a bug with Breeze or that I don't know the right syntax. Here is my model (given that Address is just a simple ComplexType class) public class Person { public int Id {get;set;} public string Name {get;set;} public Address MyAddress {get;set;} } And on the front-end with Breeze JS, I have the following: EntityQuery.from('Person').select('id,name').orderBy('id'); The above line works perfect, but if I

Breeze compatible SPA building

江枫思渺然 提交于 2019-12-12 00:28:31
问题 I am so impressed with Breeze that I decided to start collecting JavaScript frameworks / libraries which are Breeze compatible like http://www.asp.net/single-page-application/overview/templates/breezeknockout-template for example. However, simplifying JavaScript UI using the MVVMM pattern (Knockout contribution) is not all I need, as I would really like to use KendoUI for it's UI widgets and support for ASP.NET MVC. As far as I can tell, KendoUI integration with Breeze is less than complete,

Expand properties using Breeze with no database (NoDb)

风流意气都作罢 提交于 2019-12-11 23:36:48
问题 I've had some success managing to connect breeze to our custom types on the server by creating a custom metadata definition and adding it to the breeze entity manager. However, I'm unable to request an object (Employee) that has been custom-defined in javascript and retrieve its relationship(s) completely. In other words, I have an object called Employee that has a property called "LoginStats" that is a List type on the server. When requesting this object using Breeze only one element returns

Retrieving Validation Errors from Breeze Entity Collection Properties

*爱你&永不变心* 提交于 2019-12-11 22:21:01
问题 I have a Breeze entity that has several collections of other entities. When retrieving the validation errors for the first entity, I want to also retrieve the errors from each entity in its collections. So that if I have an entity Foo with many Bars and Bazs . Is there a generic way to retrieve the validation errors for the Bars and Bazs on a Foo along the lines of myFoo.getAllValidatioErrors() 回答1: here's one way you could do it: // get primary entity's validation errors. var

Adding an entity to the Breeze saveMap which comes from DB (not a totally new entity)

让人想犯罪 __ 提交于 2019-12-11 19:27:05
问题 I use Breeze in my asp.net application with the Durandal SPA template. I need to add an entity to the saveMap which already exists in DB. Let's take this simple example: the page display an invoice and the invoice's lines. The user add a new invoice's line and click the save button. The SaveChanges controller's action is triggered with ONLY the modified invoice's line. Server side, the total is recalculated and the invoice's total must be modified. But this total is located on the invoice

How to use Breeze IQueryable with CORS?

社会主义新天地 提交于 2019-12-11 19:24:32
问题 I use a method to add CORS handlers to my response that is called by a client using Breeze. You can read more about how I got that working here: Controller not filtering data in Breeze query in DotNetNuke Module However, I noticed that while $filter works, $expand and $select do not. So my question is: How can I use return a HttpResponseMessage Type and still use Breeze (I need to do this for CORS). To prove this, I downloaded and changed the Todos sample: Original method (works) http:/

breeze and sql server triggers

孤者浪人 提交于 2019-12-11 19:19:55
问题 Breeze don't have a look of what's happened to data at server side when saving these data. Breeze team said you must re-query to have updated data. Actions done synchronously during this saving like sql triggers (expl. After Insert) may be considered because of these operations can transform entities during saving so they take place at client : this will be useful for new keys not generated by Breeze like multi-parts keys. I have difficult to work-around this problem. Help? UPDATE 1: If this