breeze

Breeze with a Unit Of Work/Repository pattern

我只是一个虾纸丫 提交于 2019-12-03 13:00:28
I was just wondering how I should go about implementing breeze's EFContextProvider in a separate data layer project. Also, since that project is a class library and not an MVC 4 application, how should I include this into my project? I don't really need the whole bag of tricks that is in the Breeze NuGet package, just EFContextProvider stuff. I want to implement a Unit of work pattern using the EFContextProvider DbContext wrapper, like John Papa has done in his wonderful pluralsight course. Has anyone done this yet? any tips? Thanks We've got a more sophisticated sample coming called "TempHire

Deserializing DbGeometry with Newtonsoft.Json

好久不见. 提交于 2019-12-03 11:14:05
I'm building a SPA using Angular,Breeze and Web API 2 following the approach as outlined by John Papa in his latest PluralSight course. Everything works well and I can pull information, update, insert, delete back to the server. However I'm using Spatial Types, and when I try to update an entity with a spatial type I get the following error An exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in Newtonsoft.Json.dll but was not handled in user code Additional information: Error getting value from 'WellKnownValue' on 'System.Data.Entity.Spatial.DbGeometry'. The inner

Isn't it dangerous to have query information in javascript using breezejs?

不打扰是莪最后的温柔 提交于 2019-12-03 09:46:23
Just starting to play with breeze.js because of the obvious gains in coding time, i.e. managing to access model data from the server direct within Javascript (I am a newbie here, so obviously bare with!). In the past I have used the stock ajax calls to get/post data to the server, and I have used a few different client tools in the past to provide some help in querying local data, such as jLinq . My question is this. Isn't it dangerous to have essentially full model query access in Javascript? I must be missing something because it looks like a really well thought through tool. In the past I

Breeze error: Illegal construction - use 'or' to combine checks

时光毁灭记忆、已成空白 提交于 2019-12-03 06:51:41
问题 I met this Breeze error [Illegal construction - use 'or' to combine checks] on Chrome when loading the edit page of an entity. When I refresh the page, the error message no longer appears. This error happens randomly, irregularly on my site. I could not reproduce it using a specified scenario, just met it by random. I see this error message inside Breeze code if (curContext.prevContext === null) { curContext.prevContext = context; // just update the prevContext but don't change the curContext

Translating views with HotTowel (Durandal framework) + VS2012

我怕爱的太早我们不能终老 提交于 2019-12-03 03:44:11
I develop an ASP.NET MVC solution with Durandal and Breeze. I need to translate frontend to french and dutch. How to proceed with Durandal/knockout? In a classic ASP.NET MVC solution we have the opportunity to have the views rendered server side (thanks to razor). Thanks for your help. To expand on Rob's answer of trying the i18n.js plugin for require.js, here's the steps I followed (I'm working off the Durandal starter template in Visual Studio). Download the i18n.js plugin and put it in the App folder. Create an App/nls folder, which is where you will put the require.js resource bundles, e.g

how to make an Angular.js app offline with server sync when available

▼魔方 西西 提交于 2019-12-03 02:18:34
问题 I'm looking for an approach or a library that handles this. the idea is to store data in localstorage and sync to the backend when a connection is available, http://pouchdb.com/ looks like a cool solution but anyone has use it on production? UPDATE: Right now you can also use: MeteorJS + Angular Firebase Parse Horizon 回答1: Haven't used it yet, but familiar w/ the concepts behind BreezeJS from their other offerings in .NET. Check it out http://www.breezejs.com/ and here's Ward Bell presenting

Breeze - Adding headers to request

╄→尐↘猪︶ㄣ 提交于 2019-12-02 21:56:26
问题 I am integrating with a server using Breeze as OData client, I made the login using regular jQuery post request and got back a token which I need to add to every request, how can I add this token to the breeze requests? 回答1: A similar question appeared in the comments to Brian Noyes (wonderful) Pluralsight course on Breeze. The gist of it as follows. When you choose the OData dataservice, Breeze delegates communication with the server (the AJAX calls) to DataJS. That's how the Breeze OData

How to apply MaxExpansionDepth globally or to an entire controller in breeze

Deadly 提交于 2019-12-02 21:40:57
问题 I found this SO answer: MaxExpansionDepth with latest webapi and breeze But this only applies to a single method on the controller. Applying the BreezeQueryable attribute to the controller itself breaks the entire controller at runtime with this exception: Token PropertyName in state ArrayStart would result in an invalid JSON object. Path ''. This is presumably because not all of the methods on my (large) breeze controller return IQueryable. So, how do I change MaxExpansionDepth for my entire

Breeze.js query does not update knockout view

亡梦爱人 提交于 2019-12-02 19:38:16
问题 I am querying data via breeze.js which works fine the first time. The second time the view isn't updated. html <a id="linkQDate">Order by Newest</a> <a id="linkQScore">Order by Score</a> <div id="questionWrapper"> <ul data-bind="foreach: results"> <li> <strong><span data-bind="text: Score"></span></strong> <span data-bind="text: Titel"></span> </li> </ul> </DIV> js $(document).ready(function () { var manager = new breeze.EntityManager('/breeze/dbentities'); var isApplied = false; var dmodel;

Concurrency/ToDo Sample not working

蹲街弑〆低调 提交于 2019-12-02 18:07:57
问题 I was trying out the ToDo sample and ran into an unhandled Excaption while trying out the Concurrency Handling. The dataservice.js contains these lines in saveFailed(error) method: if (detail && detail.ExceptionType.indexOf('OptimisticConcurrencyException') !== -1) { // Concurrency error reason = "Another user, perhaps the server, may have deleted one or all of the todos."; manager.rejectChanges(); // DEMO ONLY: discard all pending changes } The client never gets to this point due to an