breeze

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

早过忘川 提交于 2019-11-30 23:17:03
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 property "WellKownValue" is called "Geography". This is also reflected in the MSDN-Documentation: https:/

Using this.Context inside BeforeSaveEntity

狂风中的少年 提交于 2019-11-30 20:41:50
I was looking for a good way to organize validation rules within BeforeSaveEntity method and I have found this comment in the file: TodoContextProvider.cs within the project: BreezeMvcSPATemplate: // A second DbContext for db access during custom save validation. // "this.Context" is reserved for Breeze save only! Why this.Context can not be used? Excellent question. The answer isn't obvious and it's not easy to cover briefly. I will try. The EFContextProvider takes the save data from the client and (ultimately) turns these data into entities within the EFContextProvider.Context . When the

Knockout validation on my dropdown don't work

一个人想着一个人 提交于 2019-11-30 20:08:32
问题 I work on a asp.net mvc project with the durandal template + breeze. I would like to define validation logic on my view for adding/editing operations. So far, it works for texts, dropdown populated from database: when the element didn't contains any data, then the element is marked in red thanks to knockout validation. But it doesn't work for dropdown populated from simple list. The elements which populates the list comes from an enum: public class Transport { [Key] int id { get; set; } ...

Breeze Extended Entity Property Only Loads on Second Query

耗尽温柔 提交于 2019-11-30 20:06:28
问题 Hopefully someone has a better insight into Breeze's Extended entities, because I'm stumped! So, I have created a partial class (WO_Rout) on the server side (Web API using Breeze's API) and created a property named "AssetJobEqNo". I have read and followed Breeze's documentation here with no avail. Following the guide I have created a constructor for this particular entity "WO_Rout" like so: var assets = function () { this.AssetJobEqNo = ''; }; var serviceName = 'cms8/workorders'; var manager

How to generate typescript interfaces/definitions for breeze entities

杀马特。学长 韩版系。学妹 提交于 2019-11-30 18:55:42
问题 I’m new to SPA and I’m learning it with durandal and breeze. Recently I have switched my solution to Typescript and I’m wondering is there any good solution to generate typed breeze entities in TypeScript basing on EF model on the server. Only thing I have found is this post Breeze.js typed entities but this is only small piece of code and not even a real project. I’m wondering is there any better solution to this issue? 回答1: Below is a page you can drop in your site to generate typescript

breezejs issues with the save bundle

橙三吉。 提交于 2019-11-30 18:48:02
问题 im working with breezejs, and the server-side code of my app is .net. in my views (client side), i want to add and entity then i want to save it. Lets assume that an entity is like this : { "Id": 1, "Name": "someName", "CreatedDate": "1900-01-01T05:00:00Z", "UpdatedDate": "1900-01-01T05:00:00Z", "CreatedBy": null, "UpdatedBy": null, "RowVersion": 0, etc ... } } i want to set the values of CreatedDate UpdatedDate CreatedBy and UpdatedBy , i can do that using javascript of course, BUT i dont

Why are my Breeze.js entities not creating ko.observables?

时光总嘲笑我的痴心妄想 提交于 2019-11-30 18:03:47
问题 I am using Breeze.js without the server side components and have the entities being created on the client side with the following code. Per Ward's request I have simplified everything and am including more information. My MetaDataStore Configuration function- function configureMetadataStore(metadataStore) { metadataStore.addEntityType({ shortName: 'Manufacturer', namespace: 'StackAndReach', autoGeneratedKeyType: breeze.AutoGeneratedKeyType.Identity, dataProperties: { id: { dataType: DT.Int64,

Translate breeze validation messages

∥☆過路亽.° 提交于 2019-11-30 16:03:01
Improving my example on how to use the metadata obtained to create validation rules in knockout (http://stackoverflow.com/questions/13662446/knockout-validation-using-breeze-utility) now I use the validators that breeze inserts into the entities: function addValidationRules(entity) { var entityType = entity.entityType; console.log(entityType); if (entityType) { for (var i = 0; i < entityType.dataProperties.length; i++) { var property = entityType.dataProperties[i]; var propertyName = property.name; var propertyObject = entity[propertyName]; var validators = []; for (var u = 0; u < property

knockout validation using breeze utility?

依然范特西╮ 提交于 2019-11-30 10:17:46
Has anyone written a utility that will convert Breeze metadata (captured from entity framework data attributes) into knockout validation extensions (using knockout.validation)? I have made an function that reads the metadata from an entity and adds validation rules. app.domain.indicador = (function () { "use strict"; var constructor = function () {...} var initializer = function indicadorInitializer(entity) { var entityType = entity.entityType; if (entityType) { console.log(entityType); for (var i = 0; i < entityType.dataProperties.length; i++) { var property = entityType.dataProperties[i];

Breeze.js mixing DTOs and entities

泄露秘密 提交于 2019-11-30 10:12:18
In Ward's article " The Breeze Server: Have It Your Way ": The typical business application has a minimum of 200 domain model types. 90+% of the time the shape of the data I'm sending over the wire is the same as the shape of the entity in my business model. ... When the shape of a client entity doesn't align well with the shape of a server-side business entity, I may switch to a DTO for that particular case. This hits the nail right on the head for our application, but what's the best way to switch just some entities for DTOs? For example, our User entity contains sensitive properties that