Namespace: Breeze.SharpAssembly: Breeze.Sharp (in Breeze.Sharp.dll) Version: 0.6.0.5 (0.6.0.5)
public void Attach(
EntityState entityState = EntityState.Unchanged,
EntityManager entityManager = null
)
Public Sub Attach (
Optional entityState As EntityState = EntityState.Unchanged,
Optional entityManager As EntityManager = Nothing
)
public:
void Attach(
EntityState entityState = EntityState::Unchanged,
EntityManager^ entityManager = nullptr
)
member Attach :
?entityState : EntityState *
?entityManager : EntityManager
(* Defaults:
let _entityState = defaultArg entityState EntityState.Unchanged
let _entityManager = defaultArg entityManager null
*)
-> unit
Parameters
- entityState (Optional)
- Type: Breeze.SharpEntityState
- entityManager (Optional)
- Type: Breeze.SharpEntityManager
The associated EntityManager will either be the EntityManager that was called to create this Entity
(
[!:Breeze.Sharp.EntityManager.CreateEntity<T>()]) or that was used to generate its ids (
GenerateId(IEntity, DataProperty))
If neither of these cases apply, then the
EntityManager's DefaultManager"/> will be used.
There is no difference between
AddToManager and
AddEntity(Entity).
Use either method to add a business object created by the
CreateEntity(Type) method
to the EntityManager cache. The object must have a "detached"
EntityState, must not
have ever been associated with another EntityManager and must have a unique EntityKey within the EntityManager to which it will
be added.
Reference