-
Notifications
You must be signed in to change notification settings - Fork 3
Attributes
Ricardo Barbosa edited this page Jul 17, 2013
·
66 revisions
Tells the MetadataGenerator that metadata about this class should be created.
When no property names are supplied, all properties are included.
[BreezeLocalizable]
public class TodoItem {...}
[BreezeLocalizable("Id", "Title")] //metadata will be only generated for Id and Title properties
public class TodoItem {...}
Maps to Breeze´s AutoGeneratedKeyType Enum and is used to inform how keys are generated to entities upon creation time. (see BreezeJS AutoGeneratedKeyType for more info)
[BreezeLocalizable]
[BreezeAutoGeneratedKeyType(BreezeNoDbMetadataGeneratorEnums.AutoGeneratedKeyType.Identity)]
public class TodoItem {...}
This informs BreezeJS that this property does not exist in the database. BreezeJS will serialize it, send it to server, and listen for its changes. But it won't try to save it.
[BreezeLocalizable]
[BreezeAutoGeneratedKeyType(BreezeNoDbMetadataGeneratorEnums.AutoGeneratedKeyType.Identity)]
public class TodoItem {
[Key]
public int TodoItemId { get; set; }
public string Title { get; set; }
[BreezeUnmapped]
public bool IsDone { get; set; }
}