breeze

Breeze JS: Is there a way to query entities from data.results?

痴心易碎 提交于 2019-12-11 07:45:22
问题 I have a Breeze web api controller, with methods that accept parameters and do some work, filtering, sorting, etc, on the server. On the querySucceeded, I'd like to do further querying to data.results. Is there a way to accomplish this? I got this working by exporting/importing data.results to a local manager, and do the projection from there. The projection is needed in order to use the observable collection in a vendor grid control. var query = datacontext.EntityQuery.from(

Is Entities on Client side anti-pattern?

纵饮孤独 提交于 2019-12-11 07:19:13
问题 I have used RIA service before, now testing Breeze Sharp. RIA as well as Breeze give an impression that what you see on the server/middle tier is what you see on the client. To support that, the term Entity is being used on both the client and the server. Is it really an Entity, or it really a Presentation Model or Model on the client? For smaller systems having one or two level entity graphs, there may not be wrong in thinking both the client and the server is the same. For larger systems

Exception in client breeze.js when using enum property on model

我的梦境 提交于 2019-12-11 06:28:21
问题 The only thing I could find about enum support in breeze.js is this feature suggestion on uservoice, which was recently marked as closed in 0.82. I'm using currently latest, 0.84.3. UPDATE: I'm using code first in EF 5.0.0 with .net 4.5. When starting application and breeze makes request for metadata, EF creates empty database and my enum property is in database as int, so that part is ok. However, when I added an enum property to my model, I got exception when breeze tried to parse metadata:

BreezeControllerAttribute exception: Could not load file or assembly 'System.Net.Http

限于喜欢 提交于 2019-12-11 05:43:10
问题 When I make a call to an API an error is displayed: "Could not load file or assembly 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.", Code I have a base controller for my APIs [BreezeNHController] public class baseApiController<T> : ApiController where T : class, IEntity { public IRepository<T> Repositorio { get; private set; } [HttpGet, BreezeNHQueryable(AllowedQueryOptions =

What breeze settings are needed to make caching work?

非 Y 不嫁゛ 提交于 2019-12-11 05:40:50
问题 I thought that Breeze does caching automatically, but in my simple test below it does not work. What other settings are needed to make this happen? var dataService = new breeze.DataService({ serviceName: 'api', hasServerMetadata: false }); var manager = new breeze.EntityManager({ dataService: dataService }); var metadataStore = manager.metadataStore; console.log('before fetch', manager.getEntities());// returns [] as expected var query = breeze.EntityQuery.from("ContentTypes"); manager

Breeze: Differences between Entity Framework and NHibernate with many to many

我的梦境 提交于 2019-12-11 05:29:37
问题 Here is the situation: WebApi v1 Breeze 1.4.7 EF 5.0/NHibernate 3.3.1 What We want: A many to many exposed as a many to one. A client can have multiple countries and a country can have multiple clients. A ClientCountry entity has been created for that purpose. My mapping looks like this: Entity Framework: modelBuilder.Entity<Client>().HasKey(p => p.Id).Property(p=>p.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity); modelBuilder.Entity<Client>().Property(p => p.Abbreviation);

AngularJS dataservice using breezejs it not resolving the promise

[亡魂溺海] 提交于 2019-12-11 05:27:43
问题 I'm trying to setup a data service in my Angular application that is using breezeJS. After I resolve my promise I can't get the .then to file in my controller. I am getting data back from my database via breeze in my data service. I could just pass back the breeze promise but I want to be able to use $q.all to know when all my data has been found. In my controller` ProApp.controller('caseInfoController', function caseInfoController($scope, $log, $timeout, caseDataService) { /***initialize

Saving Data Using Breeze.js

☆樱花仙子☆ 提交于 2019-12-11 04:30:03
问题 Well, it can be similar to How to call an arbitrary service for saving changes with breezejs, but I didn't get a clear cut answer. I have a Application with Knockout.js/Breeze.js/MVC4 and No Entity Framwork My requirement - I need to call an API when save button is clicked and pass the data to appropriate Controller using Breeze. I have my button click event as:- //Saving Profile Details fnSave_click = function () { //This profileModel will have the updated data which needs to be pushed to

How does BreezeJS track property changes

不羁的心 提交于 2019-12-11 04:22:26
问题 I am curious about how BreezeJS is able to determine which properties of an entity have changed and still support IE8? I am in the need of similar functionality for a library I am building. JavaScript setters/getters would be the easiest solution however they are not support on non-dom objects in IE8. Are they using something like : https://gist.github.com/eligrey/384583 : or something else? 回答1: It depends on the "modelLibrary" in use, for backbone and knockout Breeze uses the "observability

entityAspect.setDeleted doesn't fire the subscribed propertyChanged event

自古美人都是妖i 提交于 2019-12-11 04:16:26
问题 I am running into problem where i subscribe to propertyChanged event, the subscribed event does fire for entity Modification, but never fires for when setting entity to Deleted. what might i be doing wrong. The objective of what i am doing is that, whenever user modifies the row, i want to provide button at row level to cancel the changes. similarly when user deletes a row, i want to provide a button to unDelete a row. The modification part works as expected, but for Delete it is not working.