breeze

Saving Changes using breeze without Entity Framework

若如初见. 提交于 2019-12-23 03:35:15
问题 I am beginner in breeze, I want to integrate it into an ASP.net MVC4 project . I have the same problem in Saving Data Using Breeze.js but this post did not answer the problem and I hope we can do it this time The problem is that I don’t have to use Entity Framework and I don’t know how to replace ContextProvider in SaveChanges method in the controller [HttpPost] public SaveResult SaveChanges (JObject saveBundle) { return ContextProvider.SaveChanges (saveBundle); } I also tried to customize

Breeze.js & Knockout.js: translating breeze validation to knockout validation causes an 'Out of stack space' or 'Too much recursion'

情到浓时终转凉″ 提交于 2019-12-23 02:14:20
问题 I have a client side model generated by Breeze/OData and I used the code in this post to connect it to Knockout validation. It works great for validating individual fields through the isValid() method. However, whenever I try to use ko.validation.group against a Breeze Entity (assume that the knockout validation is configured with {deep: true} ), either calling showAllMessages , length or any other method that performs a tree traversal over the object graph, results in an infinite recursion

Breeze (1.4.5) unidirectional one-to-many: navigation collection not populated

橙三吉。 提交于 2019-12-22 18:56:10
问题 I have a model where I have a two entities, a "Parent" and a "Child". The relationship should be obvious but goes: Parent has zero or more Child entities. The Parent has a navigation property called "Children" with a collection of Child entities. The Child does NOT have a navigation property back to the parent. It only has a foreign key leading back to the parent. When I load these models into my EntityManager, the "Children" navigation property collection is only ever populated with 1 child,

BreezeJS: Server added object showing as added in client after save changes

好久不见. 提交于 2019-12-22 18:14:44
问题 I have a breeze controller that adds an entity during the save changes that the client did not submit. protected override bool BeforeSaveEntity(EntityInfo entityInfo) { if (entityInfo.Entity.GetType() == typeof(User)) { if (entityInfo.EntityState == EntityState.Added) { User user = entityInfo.Entity as User; OrganizationUser orgUser = new OrganizationUser() { Enabled = true, OrganizationId = User.OrgId, User = user }; user.OrganizationUsers.Add(orgUser); } return true; } throw new

How to generate valid metadata from EF DBContext via EdmBuilder for OData v3/BreezeJS

我与影子孤独终老i 提交于 2019-12-22 10:37:13
问题 I'm trying to write an OData v3 Backend for use in an .NET4 application. I want to use BreezeJS on the client side. For the server/OData implementation I use ODataLib v1-3. In order to generate metadata for an existing model I followed the guidelines here: http://www.getbreezenow.com/documentation/ef-design-tool (more specifically the part "The metadata-only DbContext") which describes how to use the Entity Framework as a design time tool to generate a IEdmModel and Metadata. I use the

How to ignore case using breeze FilterQueryOp

人走茶凉 提交于 2019-12-22 06:22:27
问题 I am using breeze to query data from the server and seem to be running into problems. Is there a way to filter this data and ignore cases or making the value from the field a lower case? Example: var term = "john"; query = query.where("Name", "contains", Term); The problem I am having is if the 'Name' field contains John with capital 'J', It return false but returns true if I change term to 'John'. I know this is case issue but how can I make breeze ignore the casing? without using jquery

knockout.js applybindings after breeze js queries completed

徘徊边缘 提交于 2019-12-22 05:34:14
问题 The question: How can I structure my code so that the knockout bindings are not applied until all of the queries for the ViewModel have been executed? Update: After some further research and experimentation I think that using something along the lines of a Deferred function may work. I have tried a few implementations, however it only defers until the query is called, rather than until all query results have been processed. I'm obviously doing something wrong here but my javascript foo is

Resolving breeze query/Q promise with $route resolve stops page

烂漫一生 提交于 2019-12-21 21:26:48
问题 I'm having problems executing a breeze query with angular resolve before the view is rendered. I'm trying to get some data from the server before the view is rendered with breeze. I'm using $routeProvider.when('/countries', { templateUrl: 'App/partials/countries.html', controller: Ctrl, resolve: Ctrl.resolve }). controller and service snippets: function Ctrl($scope, Q, datacontext, countries) { //... } function getCountries(forceRefresh) { var query = entityQuery. from("countries"). orderBy(

How to implement offline capable Single Page Application with Breeze.js and HTML5 local storage

心不动则不痛 提交于 2019-12-21 05:00:22
问题 I have working Single Page Application using Breeze.js for Data Access. It uses the Breeze.js to execute queries against the local cache and the data is requested only once at start up. Only the data updates are posted back on the server afterwards. I am looking for a solution to make the application connection aware. If the mobile device does not have internet connection the changes will be saved locally with Breeze.js and HTML5 local storage. When the mobile device is back online the

angularjs module dependencies

左心房为你撑大大i 提交于 2019-12-21 03:52:39
问题 I've defined my main module as such: angular.module('domiciliations', ['domiciliations.service', 'loggerService', 'person.directives']). config(['$routeProvider', function ($routeProvider) { $routeProvider. when('/domiciliations/mandats', { templateUrl: 'domiciliations/views/mandats.html', controller: mandatsCtrl }). when('/domiciliations/mandats/:rum', { templateUrl: 'domiciliations/views/mandat.html', controller: mandatCtrl }). otherwise({ redirectTo: '/domiciliations/mandats' }); }]).