breeze

My unmapped properties in breeze does not seems to work whith a projection

…衆ロ難τιáo~ 提交于 2019-12-04 06:29:02
问题 I have the following Entity: public class Invoice { [Key] public int Id { get; set; } public DateTime? ArchiveDate { get; set; } public DateTime? ClotureDate { get; set; } ... } I would like to know whether my invoice is archived or closed by using a kind of flag (boolean). For that purpose I added 2 unmapped properties in my breeze entity like this: public class Invoice { [Key] public int Id { get; set; } public DateTime? ArchiveDate { get; set; } public DateTime? ClotureDate { get; set; }

Breeze not getting metadata automatically

人走茶凉 提交于 2019-12-04 05:29:25
问题 The Breeze documentation says: This [MetadataStore.FetchMetadata] call is made automatically by Breeze just before it attempts to perform it's first query against a remote service But I am making a call like this: function getBags() { var bags; var query = breeze.EntityQuery.from('Bags'); return manager.executeQuery(query).then(querySucceded, _queryFailed); function querySucceded(data) { bags = data.result; logSuccess("Retrieved Bag Data") return bags; } } function _queryFailed(error) {

validationOptions not working with custom bindingHandlers

别等时光非礼了梦想. 提交于 2019-12-04 05:08:39
I'm using durandal/breeze with Knockout. I am working on validation on my inputs with ko.validation . Here is a classic: <input type="text" data-bind="value: myDate, validationOptions: { errorElementClass: 'input-validation-error'}" /> .input-validation-error { background-color: #c75b55 !important; } This one works pretty well: when validation failed, the input textbox is marked in red. Now I would like to use a bindingHandlers in place of a 'simple' value binding: <input type="text" data-bind="dateRW: myDate, validationOptions: { errorElementClass: 'input-validation-error'}" /> ko

CORS using asp.net web api 2 odata and breeze

老子叫甜甜 提交于 2019-12-04 04:50:07
问题 I have problem consuming my OData with Breeze. My api is hosted on another server, and I'm using asp.net web api 2.0 (which comes with VS 2013 preview). I know web api is properly configured for CORS, because I've tested it without breeze, and it worked fine. Here is web api 2.0 code which enables CORS: var cors = new EnableCorsAttribute("http://localhost:7122/", "*", "*"); config.EnableCors(cors); Here is my IEdmModel private static IEdmModel CreateModel() { var modelBuilder = new

Breeze filtering .Expand on server side

泄露秘密 提交于 2019-12-04 04:33:03
问题 I'm trying out BreezeJS . There is a requirement that I can use .expand in the client side code, but based on the role of the user, the server side will not return all the records for the .expand requested type. I tried to create a custom BreezeQueryable attribute and override a method to completely filter out the extra data first just to try. But it threw an exception. I don't see any entry point where I can do that on the server side. Please guide me in the right direction, or let me know

AngularJs console.log “$q is not defined”

佐手、 提交于 2019-12-04 02:33:58
I am getting this error in the console $q is not defined . When I did some research I found some thing like .q library has been deprecated from http://www.breezejs.com/documentation/breeze-labs/breezeangularqjs If this is so, then the whole concept of promises is also deprecated, Promises are not deprecated. In fact they're gaining quite a lot of momentum lately and are included in the next version of JavaScript. Let's look at what they say: This breeze.angular.q library has been deprecated. It is superseded by the Breeze Angular Service which more cleanly configures breeze for Angular

Error getting value from 'WellKnownValue' on 'System.Data.Entity.Spatial.DbGeography

送分小仙女□ 提交于 2019-12-03 22:21:24
问题 I am using the DbGeography-Type within a SinglePageApplication (with breeze and angular). Now when using the Data with the DbGeography-Type (readOnly) there is no problem. As soon as I save an entity which has a property of DbGeography-Type I get the following error: Error getting value from 'WellKnownValue' on 'System.Data.Entity.Spatial.DbGeography' When the data is serialized to JSON (with newtonsoft JSON.NET or is it ODATA/WebAPI?), the DbGeography gets serialized correctly but the

What's the correct way to create an unbound instance of a complex type in breeze?

梦想与她 提交于 2019-12-03 22:10:56
问题 So imagine the following model: class ComplexTypeA { public string ComplexPropertyA } class ParentTypeA { public string ParentPropertyA public ComplextTypeA ParentPropertyB } Now moving into the breeze world on the client-side, assume that for various reasons I need to create an instance of ComplextTypeA and 'attach' (I know it's not attaching, it's copying values, but can't think of another better word) it later to an instance of ParentTypeA I created separately. Simply put, what's the best

How to implement offline capable Single Page Application with Breeze.js and HTML5 local storage

无人久伴 提交于 2019-12-03 16:00:50
I have working Single Page Application using Breeze.js for Data Access. It uses the Breeze.js to execute queries against the local cache and the data is requested only once at start up. Only the data updates are posted back on the server afterwards. I am looking for a solution to make the application connection aware. If the mobile device does not have internet connection the changes will be saved locally with Breeze.js and HTML5 local storage. When the mobile device is back online the changes will be synched to the remote data storage. Any guidelines how to implement that requirement? Thanks

breezejs: overriding displayname

淺唱寂寞╮ 提交于 2019-12-03 14:32:33
I'm in the process of customizing validation messages. It's working fine using the messageTemplates property. However it uses %displayName% to render the name of the property and I can't find out how to override this value ? Is there anyway to do that ? This is not YET well documented but you can simply set the 'displayName' property on any dataProperty and this will override the autogenerated display name and will be used for all validation messages for this property. So var custType = myEntityManager.metadataStore.getEntityType("Customer"); var dp = custType.getProperty("companyName"); dp