breeze

Breeze Changing the Order of ComplexType Classes

流过昼夜 提交于 2019-12-12 03:43:08
问题 I am trying to load a "ComplexType" property (p2) that is being called from a ComplexType property (p1) (Nested ComplexType). After getting the metadata I see that both classes were recognized as complextypes, but in breeze.debug toArray(schema.complexType) it's seeing the p1 (outside complextype) first, so then when it tries to resolve one of its property type which is a complexType, p2. it's reading var type = typeMap[qualTypeName]; and since "typeMap" doesn't have p2 and "okNotFound" is

Breeze webapi controller 'cannot support querying' over DbSet error

二次信任 提交于 2019-12-12 03:33:28
问题 I have setup very similar to breeze sample application which comes in sample nuget. This is the code of my api controller: [JsonFormatter, ODataActionFilter] public class WorkOrdersController : ApiController { readonly EFContextProvider<WorkOrdersContext> _contextProvider = new EFContextProvider<WorkOrdersContext>(); public WorkOrdersController() { // I was thinking this may be the cause of the issue this._contextProvider.Context.Configuration.ProxyCreationEnabled = false; } [HttpGet] public

How to implement SaveChanges with Breeze js and Nancy

蓝咒 提交于 2019-12-12 03:25:30
问题 I have an Angular JS application with Breeze and Nancy (self-hosted with Owin). I've figured out how to get data from server with Breeze, but now I'm trying to save changes using Breeze and have problems with it. I've seen MVC examples like: [HttpPost] public SaveResult SaveChanges(JObject saveBundle) { return _repository.SaveChanges(saveBundle); } But obviously I can't do the same with Nancy. My application sends POST request to SaveChanges but then breaks with TypeError: undefined is not a

Breeze client-side custom validation with server-side data

梦想与她 提交于 2019-12-12 02:58:48
问题 I created a custom validator that check if a username is used on a DB. The whole process of validation works. What is not working is result. function createExistingUsernameValidator() { var name = 'existingUsernameValidator'; var ctx = { messageTemplate: 'Questa partita I.V.A. o codice fiscale sono già stati inseriti.', displayName: "Partita IVA o Codice Fiscale" }; var val = new Validator(name, valFunction, ctx); return val; function valFunction(value, context) { var result = ko.observable

Breeze - EF, TransactionScope and the open connection in BeforeSaveEntities

前提是你 提交于 2019-12-12 02:57:37
问题 By looking at the Breeze source code, I see that the ContextProvider opens a connection before eventually calling BeforeSaveEntities. Question: I wonder what is the reason for that? Because in some scenarios this will cause unwanted transaction promotion. Explanations below. ContextProvider.cs: private void OpenAndSave(SaveWorkState saveWorkState) { OpenDbConnection(); // ensure connection is available for BeforeSaveEntities saveWorkState.BeforeSave(); SaveChangesCore(saveWorkState);

Pass Typescript function as a Javascript function

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:28:14
问题 I use typescript with breeze. How can i pass a typescript function to executeQuery.then ? class MyClass{ ... myFunc(data:any):void{ ... } doQuery():void{ var manager = new breeze.EntityManager('/breeze/dbentities'); var query = breeze.EntityQuery.from("Corporations").where("Name", "startsWith", "Zen"); manager.executeQuery(query) .then(this.myFunc); // does not work! } } 回答1: Use this.myFunc instead of myFunc . It might be a context problem. Try this.myFunc.bind(this) instead of this.myFunc .

How to save data with a View and stored procedure using Breeze

ε祈祈猫儿з 提交于 2019-12-12 01:57:46
问题 I am using BreezeJs on the server via WebAPI. I have inherited a 3rd party app which pulls data from a variety of lookup tables and custom field tables. To simplify things, I created a SQL View which pulls all the data together and gives them good column names. This Entity is called a "Game" and my mobile app uses Breeze on the client to get games. This all works fine. I am unsure how to proceed when it comes to Saving. I need to use the standard Breeze save syntax but on the server I assume

Extending a breeze entity using TypeScript

允我心安 提交于 2019-12-12 01:54:00
问题 I am developing a website using HotTowel and TypeScript. In John Papa's excellent PluralSight course, he extended a breezejs entity by creating a constructor and using 'Object.defineProperty' to extend it. For example, he added a property called fullName as follows. NB: metadataStore is the breezejs metadata store function registerPerson(metadataStore) { metadataStore.registerEntityTypeCtor('Person', Person); function Person() { this.isPartial = false; this.isSpeaker = false; } Object

Breeze Metadata appears in xml format

蓝咒 提交于 2019-12-12 01:45:01
问题 Breeze cannot create entities. It does the query for Metadata (which is in my Controller class) and it returns data with a 200 code. Then it queries the data, and returns with a 200 code. Both sets of return data appear to be json format on the surface. Looking further into the Metadata, it appears to be json serializing the xml metadata. This does not feel right to me - and on the live example on the breeze site, does not appear to be doing this. Anyone have any tips on what might be causing

BreezeSharp - ExecuteQuery fails with NullReferenceException

 ̄綄美尐妖づ 提交于 2019-12-12 01:35:55
问题 I have been working with BreezeJS for a while, and I had grate experience with it. As I started developing mobile application in .NET, I decided to give BreezeSharp a try. I went through documentation and ToDo sample, and successfully created project explained in http://www.breezejs.com/breeze-sharp-documentation/get-your-feet-wet. I am having an issue with executing query on mine existing Web Api controller (which works great with BreezeJS). Here is query method: private async Task