Пример #1
0
        /// <summary>
        /// The schame we need to create has the entity aspect object as a property of the entity itself
        /// since this cannot be done with static types we only combine the two when creating the json
        /// </summary>
        public JObject EntityAndEntityAspectToJObject(object entity, EntityAspect entityAspect)
        {
            var jEntity = JObject.FromObject(entity, JsonSerializer);

            jEntity.Add("entityAspect", JObject.FromObject(entityAspect, JsonSerializer));
            return(jEntity);
        }
Пример #2
0
 public void AddEntity(EntityAspect entityAspect)
 {
     EntityAspects.Add(entityAspect);
 }