Download
Get started
Start with NuGet
This is the easiest way to build a Breeze application if you are using Visual Studio.
Github
The Breeze source code is free, open-source, MIT licensed, and hosted on GitHub.
Release notes
Pre-1.3.x builds and release notes are also available.
1.3.x
- Inheritance support (beta) (1.3.1)
- OData write/save support (beta) (1.3.1)
- MetadataStore.importMetadata (1.3.1)
- Edmunds sample (1.3.0)
- Named saves (1.3.0)
- Breeze.WebApi.ContextProvider delegates (1.3.0)
- JSONP support (1.3.0)
- Compact metadata format (1.3.0)
1.3.3May 8, 2013
Features
- Setting the value of a property to an empty string on an Breeze Entity will now be coerced to a null for all Nullable properties.
- A new method has been added to the ContextProvider class on the server side Breeze.WebApi.dll to allow for the construction of new EntityInfo instances while within a BeforeSaveEntities call.
public EntityInfo CreateEntityInfo(Object entity, EntityState entityState = EntityState.Added)
Bug fixes
- Importing of exported null DateTimeOffsets no longer converts them to JavaScript invalid dates.
- Fix for bug with projections involving complex types.
- Fix for Incorrect error handling where EntityManager.executeQuery fails during a merge.
- Fix for issue with the JsonResultsAdapter not being able to handle null nodes.
- Fix for attach logic involving 1 -> 0:1 relation between entities with a shared primary key.
- In an inheritance hierarchy the EntityType.defaultResourceName now inherits from its parent's defaultResourceName.
- Fix for issue where Guid keys were not being compared in a case insensitive manner and should have been.
- Fix for incorrect resource name / entityType mapping being defined for some inheritance hierarchies.
- Fix for assumption that an identity column is always part of the primary key for an Entity.
1.3.2May 2, 2013
Features
- The EntityManager.createEntity initializer parameter now allows related entities to be attached to the newly created entity.
- The EntityManager.createEntity method will now accept an EntityType as well as an entity type name as its first parameter.
Bug fixes
- Fix for Breeze/EF bug involving a single query with "expand", "orderBy", and "take" performing incorrect ordering.
- Fix for several issues with nested complex types.
- Fix for metadata resolution failures on some models using inheritance.
- Fix for issue with MetadataStore.registerEntityTypeCtor and EntityManager.importEntities involving the "backingStore" model library.
- Fix for bug involving the EntityQuery.using method and the JsonResultsAdapter.
- Fix for condition where the DataProperty.nameOnServer was incorrectly defined for some unmapped properties and not for others.
1.3.1Apr. 25, 2013
Two Beta Features:
-
Inheritance Support - This includes the ability to query and save all forms of Entity Framework inheritance models (TPC, TPH, and TPT). This also includes metadata changes so that non-EF / non-.NET services can expose inheritance hierarchies as well. Features include:
- Ability to perform server side polymorphic queries or navigations.
- Ability to perform client side polymorphic queries or navigations.
- Insert, update, delete.
- Navigation to related parent and child entities.
- Extensions to the Breeze metadata format to support inheritance.
- Two new EntityType methods: EntityType.isSubtypeOf and EntityType.getSelfAndSubtypes.
Documentation is on the way. Meanwhile you can explore a comprehensive collection of explanatory tests in the inheritanceTests file of the DocCode Sample. There is a new companion "Inheritance" model in that sample project illustrating TPH, TPT, and TPC inheritance.
-
OData Write/Save Support - Calling EntityManager.saveChanges now performs the appropriate OData Multipart MIME POST, MERGE, and DELETE operations. (Previously, only OData read operations were supported).
- This feature requires that the OData service support OData batch operations. See http://www.odata.org/documentation/odata-v2-documentation/batch-processing/. Currently Microsoft's WCF Data Services do support batch operations but the new ASP.NET MVC4 Web API OData library does NOT... (although they say it's coming).
These two features are being released as Beta features not because we expect these API's to change in the future. (In fact, there were very few new API calls added to support either of these features. Almost all of the code to support these capabilities occurs under the covers.) The Beta designation indicates that although we have done a great deal of testing on these features, we only have a moderate number of test scenarios and need community feedback to determine whether we've missed any test cases.
Other Features
- The MetadataStore.importMetadata method will now accept metadata in either Breeze's native metadata format or as an EDMX CSDL document encoded as JSON (this is what is returned by both OData services as well as EFContextProvider backed web services).
- Breaking Change: the Breeze controller route prefix has changed from 'api/' to 'breeze/' in all NuGet packages, templates, and samples. This change addresses the oft occurring conflicts between Breeze Web API routes and default Web API routes.
Heretofore, a request such as "host.com/api/something/123", which was supposed to go to a regular Web API controller would be routed instead to a Breeze Web API controller ... and fail. There was no reliable way to disambiguate these requests without changing the route prefix (note: the Microsoft Web API team recently did something similar when it designated 'odata/' as the route prefix for its specialized OData controllers).
The BreezeWebApiConfig.cs in App_Start incorporates this change.
After updating your breeze.webapi NuGet package, you may have to change the "serviceName" passed to your EntityManager constructor from 'api/...' to 'breeze/...'. Alternatively, you can change the value in BreezeWebApiConfig.cs back to 'api/' ... and future NuGet package updates will not touch this file again. We regret the inconvenience.
Bug fixes
- Fix for incorrect error propagation involving failed promises.
- Fix for issue involving entity navigation fixup with a unidirectional associations. This manifested as children that would not be correctly associated with their parents if the child was loaded first
- Fix so that when Breeze deletes a parent entity, it no longer clears the related property on any children if the related property is actually part of the child's key.
- Fix for bug with EntityQuery.inlineCount and CORS. This involved a move of inlineCount information out of the HTTP header and into the query response payload.
- Fix for bug involving the EntityQuery.toType method.
1.3.0 - Feature ReleaseApr. 16, 2013
- Added a new AngularJS sample, "Edmunds", showing how to consume a generic HTTP service with Breeze. It's a pure JavaScript client sample with no ASP.NET, Web API, EF, or SQL database dependencies. It demonstrates several features and changes of this release including the compact Metadata format and JSONP support.
- Added "Named Saves". By default the EntityManager.saveChanges method sends a save request to an endpoint called "SaveChanges". With "Named Save", you can target a different server endpoint such as an arbitrarily named action method on another Web API controller. There are two new properties on the SaveOptions class. A resourceName (for the action method) and a dataService (for targeting a different controller). Assuming that you want to save all pending changes, you could write
var so = new SaveOptions({ resourceName: "myCustomSave" }); // null = 'all-pending-changes'; saveOptions is the 2nd parameter myEntityManager.SaveChanges(null, so );The client sends a JSON change-set bundle to 'MyCustomSave'. The signature of 'MyCustomSave' should be the same as 'SaveChanges'. - Added two new delegates to the Breeze.WebApi.ContextProvider class, BeforeSaveEntitiesDelegate and BeforeSaveEntityDelegate. Developers may extend a ContextProvider with save interception logic by assigning these delegates rather than subclassing and overriding the corresonding BeforeSaveEntities and BeforeSaveEntity methods. There is no difference in functionality. Choose the approach that suits your architectural style.
- Added JSONP support via a new useJsonp property on the DataService class:
var ds = new breeze.DataService({ serviceName: serviceName, hasServerMetadata: false, useJsonp: true }); var manager = new breeze.EntityManager({dataService: ds}); - Added a new compact metadata format. The EntityType constructor will now accept DataProperties and NavigationProperties in the following format. The more verbose API is still available and has not changed.
metadataStore.addEntityType({ shortName: "Model", namespace: "Edmunds", dataProperties: { id: { dataType: "String", isPartOfKey: true }, makeId: { dataType: "Int64" }, name: { dataType: "String" }, vehicleStyles: { dataType: "String" }, vehicleSizes: { dataType: "String" }, categories: { dataType: "Undefined" } }, navigationProperties: { make: { entityTypeName: "Make:#Edmunds", isScalar: true, associationName: "Make_Models", foreignKeyNames: ["makeId"] } } });
- The DataProperty constructor accepts DataTypes as strings as well as DataType objects.
- The visitNode method of the JsonResultsAdapter may return a string as well as an EntityType.
- The Breeze Typescript definition file was updated to the latest version of Breeze.
- Improved the error messages in several areas related to Metadata construction and use of the JsonResultsAdapter.
- The native Breeze metadata format was modified. The structuralTypeMap property, the value of which was an object containing EntityTypes keyed by type name, has become the structuralTypes property, a simple array of EntityTypes. This is a small breaking change that should only affect applications that served metadata using the native Breeze metadata format created as a JSON object on the server.
- Bug fix involving queries and type coercion with 'byte' properties.
- Bug fix involving saves where a date property was part of the key.
- Bug fix involving incorrect change tracking of date properties.
- Bug fix involving Incorrect ordering in local query results when using an orderBy clause on properties containing null values.
- Bug fix involving calling entityAspect.validateProperty with a null value.
