breeze

Uninitialised JsonSerializer in Breeze SaveBundleToSaveMap sample

大城市里の小女人 提交于 2019-12-01 11:53:11
I'm attempting to use the SaveBundleToSaveMap snippet linked below to implement custom save handling on the server side of a breeze web api implementation. SaveBundleToSaveMap This sample does not work as is? (see below); their is a null reference exception which could use some attention. The SaveWorkState(provider, entitiesArray) constructor calls the ContextProvider.CreateEntityInfoFromJson(...) method which then calls (the class scoped) JsonSerializer.Deserialize(new JTokenReader(jo), entityType) method. The issue is that JsonSerializer is uninitialised and we get a null reference exeption.

creating/updating breeze entities with one-to-one relationship

北战南征 提交于 2019-12-01 11:42:03
I'm working on a project using Breeze and I came across a problem with some entities I had created using a one-to-one relationship. This is a bit of a long story, but it has a happy ending, so bear with me :) Here is a cut down version my C# code: public class Person { [Key] public int Id { get; set; } public virtual User User { get; set; } public string FirstName { get; set; } public string LastName { get; set; } } public class User { [Key] public int Id { get; set; } [Required] public virtual Person Person { get; set; } [Required] public string EmailAddress { get; set; } [Required] public

Breeze executeQuery Q promise fails CORS

寵の児 提交于 2019-12-01 11:12:30
问题 I'm having a problem with consuming OData Services using Breeze, I set up a Web API OData service by following this guide, from Fiddler it works excellent as expected, but when I try to use it with breeze it fails and gives an error message of "OK": [Q] Unhandled rejection reasons (should be empty):Error: OK Using fiddler I see it goes and queries for metadata and then it queries for the entities which are returned correctly, what could be the problem here? breeze.config

Uninitialised JsonSerializer in Breeze SaveBundleToSaveMap sample

余生颓废 提交于 2019-12-01 10:35:15
问题 I'm attempting to use the SaveBundleToSaveMap snippet linked below to implement custom save handling on the server side of a breeze web api implementation. SaveBundleToSaveMap This sample does not work as is? (see below); their is a null reference exception which could use some attention. The SaveWorkState(provider, entitiesArray) constructor calls the ContextProvider.CreateEntityInfoFromJson(...) method which then calls (the class scoped) JsonSerializer.Deserialize(new JTokenReader(jo),

creating/updating breeze entities with one-to-one relationship

强颜欢笑 提交于 2019-12-01 09:51:34
问题 I'm working on a project using Breeze and I came across a problem with some entities I had created using a one-to-one relationship. This is a bit of a long story, but it has a happy ending, so bear with me :) Here is a cut down version my C# code: public class Person { [Key] public int Id { get; set; } public virtual User User { get; set; } public string FirstName { get; set; } public string LastName { get; set; } } public class User { [Key] public int Id { get; set; } [Required] public

How to add a property to an EntityType after it has been added to the Data Store?

梦想的初衷 提交于 2019-12-01 06:02:39
问题 I have an Entity Framework Code First model with a column that is not mapped which I still want to persist between the server and the client. The model looks similar to this with many more properties: public class OwnerInformation { [Key] [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)] public int Id { get; set; } [Required] [MaxLength(16)] public byte[] SSNEncrypted { get; set; } [NotMapped] [MaxLength(9)] [MinLength(9)] public string SSN { get; set; } } When the metadata is

.net WebApi OData + breeze => [Q] Unhandled rejection reasons (should be empty)

笑着哭i 提交于 2019-12-01 05:18:52
I have a .net 4.5 Web Api with OData EntitySetController In client side I got the following js files loaded jquery.min.js q.min.js datajs-1.1.1.min.js breeze.debug.js toastr.min.js angular.js when I call the following javascript breeze.config.initializeAdapterInstance("dataService", "OData"); var manager = new breeze.EntityManager(serviceName); var query = breeze.EntityQuery.from("Customers"); return manager.executeQuery(query).then(success).fail(fail); function success(data) { $log.info("Retrieved " + data.results.length); return data.results; } function fail(data) { $log.info("error " + data

Breeze Extended Entity Property Only Loads on Second Query

烂漫一生 提交于 2019-12-01 01:33:12
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 = new breeze.EntityManager({ serviceName: serviceName }); var store = manager.metadataStore; store

Knockout validation on my dropdown don't work

血红的双手。 提交于 2019-12-01 01:10:10
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; } ... [Required] public EnumCategory Category { get; set; } } public enum EnumCategory { Cat1, Cat2, Cat3 }

How can I manually execute Breeze filters in Web Api?

陌路散爱 提交于 2019-12-01 00:05:34
I want to use some external server-side logic to modify properties on the results of a query. To do this, I'll need to apply the Breeze query options, modify the result set, and return it. I know essentially how I can apply OdataQueryOptions to my query, but I don't want to miss out on all the things that BreezeJS does that Web Api's OData doesn't. For example, I want to keep inlineCount . How can I do this? Is there some way to hook into Breeze's query modifying code? In case it matters, I'm using Entity Framework 6 and Web Api 2. Ok, I'm not sure if there's a better way (because this seems