breeze

BreezeJs with dedicated web worker

半世苍凉 提交于 2020-01-01 17:43:10
问题 I am trying to initialize a Breeze manager inside a 'Web Worker'. RequireJs, knockout, q, breeze are being imported inside the worker. After a call to: EntityQuery.from('name').using(manager).execute() , the following error appears: Uncaught Error: Q is undefined. Are you missing Q.js? See https://github.com/kriskowal/q . A live preview is uploaded here http://plnkr.co/edit/meXjKa?p=preview (plunk supports downloading for easier debug). EDIT -- relevant code Worker.js importScripts('knockout

BreezeJs with dedicated web worker

ⅰ亾dé卋堺 提交于 2020-01-01 17:43:06
问题 I am trying to initialize a Breeze manager inside a 'Web Worker'. RequireJs, knockout, q, breeze are being imported inside the worker. After a call to: EntityQuery.from('name').using(manager).execute() , the following error appears: Uncaught Error: Q is undefined. Are you missing Q.js? See https://github.com/kriskowal/q . A live preview is uploaded here http://plnkr.co/edit/meXjKa?p=preview (plunk supports downloading for easier debug). EDIT -- relevant code Worker.js importScripts('knockout

Perform a select and expand in the same query with breeze is not supported

二次信任 提交于 2020-01-01 11:45:08
问题 I develop an asp.net solution with Durandal/breeze. Here is my code to get all my shippers: var query = EntityQuery.from('Shippers') .select('id, name, street, city'); return manager.executeQuery(query) .then(querySucceeded) .fail(queryFailed); Here is the related model: public class Shipper { [Key] public int Id { get; set; } public string Name { get; set; } public string Street { get; set; } public string Number { get; set; } public City City { get; set; } } public class City { public int

EF Code First: The INSERT statement conflicted with the FOREIGN KEY constraint

你说的曾经没有我的故事 提交于 2019-12-31 05:52:30
问题 This is my trial project using breeze/angular/EF. I don't understand why I get this error because I thought I had the same structure working before. public class TshirtOrder { public int Id { get; set; } public string Name { get; set; } public virtual ICollection<OrderItem> OrderItems { get; set; } } public class OrderItem { public int Id { get; set; } [ForeignKey("Type")] public int TshirtTypeId { get; set; } public virtual TshirtType Type { get; set; } [ForeignKey("Size")] public int

Breezejs Double trouble in angularjs

痞子三分冷 提交于 2019-12-31 02:23:05
问题 I am trying to change a value in a angular view from a integer to a float/double value that is bind to ngmodel. The input don’t except anything other than a integer. My guess is that breeze does something in the background to validate the value or something on the "defined properties". But my knowledge of JavaScript prototyping is very limiting aka I need to learn it.. This is really hard to explain so I created a plunk that can hopefully help: http://plnkr.co/edit/Gcj0VvBE3f8DRbIjMtqt?p

.net WebApi OData + breeze => [Q] Unhandled rejection reasons (should be empty)

荒凉一梦 提交于 2019-12-30 09:00:30
问题 I have a .net 4.5 Web Api with OData EntitySetController In client side I got the following js files loaded jquery.min.js q.min.js datajs-1.1.1.min.js breeze.debug.js toastr.min.js angular.js when I call the following javascript breeze.config.initializeAdapterInstance("dataService", "OData"); var manager = new breeze.EntityManager(serviceName); var query = breeze.EntityQuery.from("Customers"); return manager.executeQuery(query).then(success).fail(fail); function success(data) { $log.info(

.net WebApi OData + breeze => [Q] Unhandled rejection reasons (should be empty)

落花浮王杯 提交于 2019-12-30 08:59:22
问题 I have a .net 4.5 Web Api with OData EntitySetController In client side I got the following js files loaded jquery.min.js q.min.js datajs-1.1.1.min.js breeze.debug.js toastr.min.js angular.js when I call the following javascript breeze.config.initializeAdapterInstance("dataService", "OData"); var manager = new breeze.EntityManager(serviceName); var query = breeze.EntityQuery.from("Customers"); return manager.executeQuery(query).then(success).fail(fail); function success(data) { $log.info(

Securing Breeze on the server to prevent malicious updates to foreign keys

*爱你&永不变心* 提交于 2019-12-30 03:18:06
问题 The Problem I'm just trying to figure out exactly how much of my own security I need to implement on the server side when saving changes in Breeze. In particular, I'm thinking about how a malicious user could manually hack the SaveChanges request, or hack the javascript in the client, to bypass my normal business rules - for example, to maliciously alter foreign key IDs on my entities. I want to understand exactly where I need to focus my security efforts; I don't want to waste time

UnMapped property on the Angular/Breeze SPA template

醉酒当歌 提交于 2019-12-29 08:24:28
问题 I am using the Angular/Breeze SPA template in visual studio 2012. I have added an unmapped property in the TodoList server model. [NotMapped] public string MyUnmappedProperty{ get{return "testString";}} I have registered the unmapped property in the constructor on the client model, specifically in the todo.model.js like Ward suggested here : Handling calculated properties with breezejs and web api function TodoList() { this.title = "My todos"; // defaults this.userId = "to be replaced"; this

Save Changes with breeze Assembly could not be found for EntityName:#xx.xx.xx.xx.xx"

ⅰ亾dé卋堺 提交于 2019-12-25 16:35:52
问题 When saving changes, the follow Exception occurs: "Assembly could not be found for EntityName:#xx.xx.xx.xx.Entities" First 3 lines of Stack: at Breeze.ContextProvider.ContextProvider.LookupEntityType(String entityTypeName) at Breeze.ContextProvider.SaveWorkState.<.ctor>b__8(IGrouping`2 g) at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext() JS: function remove(entity) { entity.entityAspect.setDeleted(); return this.manager .saveChanges() .then(ok, ko); } What can be causing this