I'm following Breeze's NoDb sample in order to add custom types to the Breeze metaDataStore. My goal is to be able to call my web api controller method and have a client-side version of that object fully hydrated.
I've been unable to retrieve an Employee object and map my Employee properties (FirstName, LastName) nor the complex types that I've included. These complex types are simply properties on my Employee object consisting of collections of other custom classes on the server side.
For example, I have a custom type of "CompanyAffiliates" that contains a CompanyId and a Name property.
I can't seem to get Breeze to map anything correctly, and I'm not getting any feedback from errors. Can anyone provide me with some suggestions?
Here's some relevant code:
addEmployeeType = function() {
var entityType = new _entityType({
shortName: "Employee",
namespace: "HSSPortal.Business.Models",
autoGeneratedKeyType: _autoGeneratedKeyType.Identity
});
entityType.addProperty(new _dataProperty({
name: "customerId",
dataType: _dataType.String,
isNullable: false,
isPartOfKey: true
}));
entityType.addProperty(new _dataProperty({
name: "firstName",
dataType: _dataType.String,
isNullable: false
}));
entityType.addProperty(new _dataProperty({
name: "lastName",
dataType: _dataType.String,
isNullable: false
}));
_store.addEntityType(entityType);