protected void AddEntityDefaultAttributes(Entity e) { // Add createdon, modifiedon, createdby, modifiedby properties if (CallerId == null) { CallerId = new EntityReference("systemuser", Guid.NewGuid()); // Create a new instance by default if (ValidateReferences) { if (!Data.ContainsKey("systemuser")) { Data.Add("systemuser", new Dictionary <Guid, Entity>()); } if (!Data["systemuser"].ContainsKey(CallerId.Id)) { Data["systemuser"].Add(CallerId.Id, new Entity("systemuser") { Id = CallerId.Id }); } } } var isManyToManyRelationshipEntity = e.LogicalName != null && this.Relationships.ContainsKey(e.LogicalName); EntityInitializerService.Initialize(e, CallerId.Id, this, isManyToManyRelationshipEntity); }
protected void AddEntityDefaultAttributes(Entity e) { //Add createdon, modifiedon, createdby, modifiedby properties if (CallerId == null) { CallerId = new EntityReference("systemuser", Guid.NewGuid()); //Create a new instance by default } EntityInitializerService.Initialize(e, CallerId.Id); }
protected void AddEntityDefaultAttributes(Entity e) { //Add createdon, modifiedon, createdby, modifiedby properties if (CallerId == null) { CallerId = new EntityReference("systemuser", Guid.NewGuid()); //Create a new instance by default } var isManyToManyRelationshipEntity = e.LogicalName != null && this.Relationships.ContainsKey(e.LogicalName); EntityInitializerService.Initialize(e, CallerId.Id, isManyToManyRelationshipEntity); }