breeze

Saving a toISODate gets deserialized as a non-iso string

帅比萌擦擦* 提交于 2019-12-12 06:36:43
问题 I follow the usual recommendations of serializing javascript Date objects to be sent to the server by using the toISODate js function. In fact Breeze.js is doing this for me which is great. Everything works as expected when the property on my Entity is a DateTime - the date gets saved to the database as a UTC (0 offset date) datetime. I hit a problem when the property on the Entity is of type string . A date that is sent over the wire as ' 2013-06-08T23:00:00Z ' is being deserialized into the

Can't Fetch Metadata from breeze ,error occurred

隐身守侯 提交于 2019-12-12 06:19:16
问题 I am trying to develop some sort of calculator using breeze so that while calculating if user wanna save the datails he/she can save it into database and can display using breeze webapi. My page with knockout bindings to get data from breeze <div id="calculatorList"> <table class="table table-striped"> <tbody data-bind="foreach: calculate"> <tr> <td data-bind="text: FirstNumber"></td> <td data-bind="text: Operator"></td> <td data-bind="text: SecondNumber"></td> <td data-bind="text: Output"><

Sorting an observable array, which has queried data returned by breezeJS

血红的双手。 提交于 2019-12-12 05:49:39
问题 The above image is of observableArray which is coming while queryinq database using breezeJS (using EntityManager). My question is that how do we sort this observable based on some criteria i.e., (object.attributeName) ? So that this array is sorted based on some attribute name and we can simply use the observable within foreach bindings and use them in sorted way because I don't wanna query all the time (locally or from server) to get data in sorted order. 回答1: So make a computed var

Breeze is not working with some project settings

邮差的信 提交于 2019-12-12 05:35:10
问题 I have a problem using breeze on a project based on John Papa's HotTowel. I configured breeze like: var mgr = new breeze.EntityManager('breeze/Breeze'); everything is ok but in the case I change the Project properties Start Action from Current Page to Specific Page: HotTowel/Index and breeze doesn't work properly. I've checked the requests using firebug. It seems in this case application sends a GET request like this: http://localhost:53180/HotTowel/Index/breeze/Breeze/Metadata instead of

Breeze Entity manager relative path

こ雲淡風輕ζ 提交于 2019-12-12 04:59:11
问题 A similar question is HERE but with no solution. I am able to run my project on localhost but once deployed, loading the metadata fails. Looking into chrome developper tools, the request is sent to http://www.domain.org/breeze/metadata instead of http://www.domain.org/projectname/breeze/metadata . On my localhost, the metadata loads as http://localhost:xxxx/breeze/Metadata . My entity manager is declared as new breeze.EntityManager('breeze') . If I change the entitymanager to new breeze

BreezeJS RequireJS support unstable (knockout example)

蹲街弑〆低调 提交于 2019-12-12 04:57:01
问题 As I'm trying to compile my project with breeze and requirejs for production, I'm running into multiple issues. Unrolling this, I tried starting fresh with the Knockout RequireJS example. After I installed MVS2013Pro I was able to run the project, but not without issues: window.breeze is defined so it has been leaked to global scope (this should not happen with RequireJS) Hitting F5 Refresh will crash with Uncaught Error: Can't find breeze and/or Q (breeze savequeuing) Uncaught TypeError:

how to make bindings work when we add html at run time?

Deadly 提交于 2019-12-12 04:55:01
问题 I am working on Knockout bindings with breeze JS. While adding data to database for some entries by using breeze controller, I am trying to display few more fields related to one particular attribute which is required while storing data into my local database . So I created a custom binding which makes me do that. But I found that the fields I am adding in my view does not bind with my observable which I am using while creating a new entry Here is the knockout binding ko.bindingHandlers

breezejs: Nonscalar navigation properties are readonly

我的未来我决定 提交于 2019-12-12 04:35:42
问题 I have the following metadata: var entityTypeParent = { shortName: 'ParentItemType', namespace: 'MyNamespace', autoGeneratedKeyType: Identity, defaultResourceName: 'ParentItemTypes', dataProperties: { id: { dataType: DT.Int32, isPartOfKey: true } }, navigationProperties: { users: { entityTypeName: 'User', isScalar: false, associationName: 'ParentItem_User' } } }; var entityTypeUser = { shortName: 'User', namespace: 'MyNamespace', autoGeneratedKeyType: Identity, defaultResourceName: 'Users',

breeze - modify an entity, on the server, based upon it's navigational properties, before saving

倖福魔咒の 提交于 2019-12-12 04:07:44
问题 Is there any way to get an Entity's navigational property's "current" value in BeforeSaveEntity (or anywhere else before save) in breeze on the server side? By current, I mean what exists in the database, with any incoming changes merged in. This isn't for validation, rather I am computing a value for a parent property (that I don't want on the client) based upon both the parent fields and children fields... For example, public class Parent { public ICollection<Child> Children{ get; set; } }

BreezeJS saveChanges sends an array instead of an object

橙三吉。 提交于 2019-12-12 03:44:44
问题 This question stems off of this other article. I'm currently using BreezeJS with Entity Framework but I don't believe I am using it quite the way it was intended. Currently I am calling save changes on an array of entities that I am sending to the server and then deserializing them into their original structure. I'm hoping there's a better way to do this that I just haven't been able to find. There are two ways I see I could do this but can't get them to work. First would be to send the array