breeze

How to consume OData service with Html/Javascript?

坚强是说给别人听的谎言 提交于 2019-12-18 10:41:26
问题 Our project currently uses Silverlight to consume an Odata service. This has made life pretty simple since we can just reference the OData service thus giving us generated service reference/entities. However there is some discussion on whether we should move to Html (html5). I'd like to know what to expect if we make this change. We'd be leveraging a framework like jQuery of course. My main concern is how to consume the same OData service via JavaScript/jQuery. How are we suppose to

Entity Framework object graph deletion with Breeze

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 09:41:26
问题 I am encountering a recurring problem that just makes no sense, and hoping someone (in the Breeze team?) can shed some light. The following model illustrates the entities in question. As you can see, I'm adhering pretty strictly to Entity Framework conventions in my property names, and as a result, if I check in SQL the cascade on delete rules are set by EF code first when it creates the db. Now, when I try to delete a BusUnit manually in SQL, the delete cascades correctly and the

Using Knockout and Breeze with Cascading Dropdowns

北城余情 提交于 2019-12-14 03:25:10
问题 So I've been at this back and forth for quite a long time now, so I'll just get to the point. I am creating an application based on the HotTowel template, so I'm using knockout, breeze, Q etc. I'm using a breeze query to get some data from the server, and then I load that data into the first select (as options). This changes the selectedModel observable and the subscription triggers ( the subscription is the current "solution", I have used data-bind etc with the same results). The

How/when to query 'extended' entities in Breeze

大憨熊 提交于 2019-12-14 03:06:20
问题 I have a ViewModel that loads up 'child' entities and I want to also display 'grandchild' entities based off of each child that is loaded. To simplify things, I need help identifying how to query these objects and display them under the proper 'tree' in the browser (apologies for my butchering of coding language : )) I am using Knockout to bind the data and loading up the entities with Breeze. This question is an extension of When to add extend additional complex types onto a Breeze entity

Breeze error: Unable to locate a 'Type' by the name: '' - call fetchMetadata first

与世无争的帅哥 提交于 2019-12-14 02:34:32
问题 I'm trying to save new item to my database using Breeze and web api. Here is my model: public class MuscleGroup { #region Properties public int MuscleGroupId { get; set; } public string Name { get; set; } public string Description { get; set; } public string ImageUrl { get; set; } #endregion #region Navigational properties public virtual ICollection<Muscle> Muscles { get; set; } public virtual ICollection<Exercise> Exercises { get; set; } #endregion } Here is my API: [BreezeController] public

BreezeJS - handling lookup tables across modules

前提是你 提交于 2019-12-13 21:32:47
问题 We have a large application that allows the user to switch between different modules within the application. Each module needs to be able to save separately, so each module has it's own EntityManager. There are some lookup tables, though, that we would like to use across the application. If we load the lookup tables at the application level, using a different EntityManager, they are not very usable then within the modules. For example, if I want to load a 'Countries' lookup table at the

Is it possible to see if a specific property changed on a modified entity?

荒凉一梦 提交于 2019-12-13 19:31:16
问题 When saving a certain entity I want to send a notification email if the Approved property of this entity has changed. if (changedEntity.Entity is Option) { // Pseudo if changedEntity.Entity.Approved changed { send notification() } } Is there a certain way to do this? Or can it be done by comparing the CurrentValues against the OriginalValues ? 回答1: If you know the specific entity that you want to 'watch', you can use the EntityAspect.propertyChanged event (see: http://breeze.github.io/doc-js

BreezeJS: Change Enum Text Values in MetadataStore

為{幸葍}努か 提交于 2019-12-13 19:15:18
问题 I'm absolutely loving BreezeJS and was so surprised to see that my Enum values were being displayed as their text values and not their ordinal ones! What I would love to be able to do is, on the client side, open the MetadataStore, fetch the enumeration and modify it's textual properties for display purposes. Is this currently possible? From my research it would appear not, but I'm wondering if there is perhaps a simple workaround. Everything I've tried has involved a large number of hacks

Breeze newValue.getProperty is not a function

自古美人都是妖i 提交于 2019-12-13 16:09:43
问题 I've updated to new version of breeze and ef 6. And after I did this, I get error newValue.getProperty is not a function Whenever I try to execute expand query. (for "normal" queries everything is fine ) So here is my model for Mucsle: public int MuscleId { get; set; } public string Name { get; set; } public int MuscleGroupId { get; set; } public MuscleGroup MuscleGroup { get; set; } And for MuscleGroup: public int MuscleGroupId { get; set; } public string Name { get; set; } public

roles based security in breezejs and EF6

感情迁移 提交于 2019-12-13 14:20:46
问题 I am using Breeze.js, AngularJS, Web API and EF6 in a project which has 3 main security roles. Lets say High Level, Medium Level, and Low Level. In these examples I have Person, Company, LowLevelSecret, MediumLevelSecret, HighLevelSecret entities. Security Problem 1: In the first example I want to be able to secure access to the entities as a whole. All security roles (low level, medium level and high level) should be able to access the Person entities. Only the users with a matching role