예제 #1
0
 protected bool Deactivate(ICharacterStoryArc entity)
 {
     // Deactivate it
     CharacterStoryArcsRepository.Deactivate(entity);
     // Try to Save Changes
     CharacterStoryArcsRepository.SaveChanges();
     // Finished!
     return(true);
 }
 public virtual bool AreEqual(ICharacterStoryArcModel model, ICharacterStoryArc entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // CharacterStoryArc Properties
         // <None>
         // Related Objects
         && model.CharacterId == entity.CharacterId
         && model.StoryArcId == entity.StoryArcId
         ;
 }
 public virtual bool AreEqual(ICharacterStoryArcModel model, ICharacterStoryArc entity)
 {
     return(EntityMapper.AreEqual(model, entity)
            // CharacterStoryArc Properties
            // <None>
            // Related Objects
            && model.CharacterId == entity.CharacterId &&
            model.StoryArcId == entity.StoryArcId
            );
 }
        public virtual ICharacterStoryArcModel MapToModelListing(ICharacterStoryArc entity, int currentDepth = 1)
        {
            currentDepth++;
            var model = EntityMapper.MapToModelListing <ICharacterStoryArc, CharacterStoryArcModel>(entity);

            // CharacterStoryArc Properties
            // <None>
            // Related Objects
            model.CharacterId = entity.CharacterId;
            model.StoryArcId  = entity.StoryArcId;
            // Return Entity
            return(model);
        }
예제 #5
0
 protected bool Remove(ICharacterStoryArc entity)
 {
     if (entity == null)
     {
         return(true);
     }                                    // No entity found to remove, consider it passed
     // Remove it
     CharacterStoryArcsRepository.Remove(entity);
     // Try to Save Changes
     CharacterStoryArcsRepository.SaveChanges();
     // Finished!
     return(true);
 }
 public virtual void MapToEntity(ICharacterStoryArcModel model, ref ICharacterStoryArc entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // CharacterStoryArc Properties
     // <None>
     // Related Objects
     entity.CharacterId = model.CharacterId;
     entity.Character = (Character)model.Character?.MapToEntity();
     entity.StoryArcId = model.StoryArcId;
     entity.StoryArc = (StoryArc)model.StoryArc?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual void MapToEntity(ICharacterStoryArcModel model, ref ICharacterStoryArc entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // CharacterStoryArc Properties
     // <None>
     // Related Objects
     entity.CharacterId = model.CharacterId;
     entity.Character   = (Character)model.Character?.MapToEntity();
     entity.StoryArcId  = model.StoryArcId;
     entity.StoryArc    = (StoryArc)model.StoryArc?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual ICharacterStoryArcModel MapToModel(ICharacterStoryArc entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<ICharacterStoryArc, CharacterStoryArcModel>(entity);
     // CharacterStoryArc Properties
     // <None>
     // Related Objects
     model.CharacterId = entity.CharacterId;
     model.Character = entity.Character?.MapToModel();
     model.StoryArcId = entity.StoryArcId;
     model.StoryArc = entity.StoryArc?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
 public void Add(ICharacterStoryArc entity)
 {
     Context.CharacterStoryArcs.Add((CharacterStoryArc)entity);
 }
 public static bool AreEqual(this ICharacterStoryArcModel model, ICharacterStoryArc entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
 public static ICharacterStoryArcModel MapToModelListing(this ICharacterStoryArc entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
 public static void MapToEntity(this ICharacterStoryArcModel model, ref ICharacterStoryArc entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public static bool AreEqual(this ICharacterStoryArcModel model, ICharacterStoryArc entity)
 {
     return Mapper.AreEqual(model, entity);
 }
 public static void MapToEntity(this ICharacterStoryArcModel model, ref ICharacterStoryArc entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public void Update(ICharacterStoryArc entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(ICharacterStoryArc entity)
 {
     Context.CharacterStoryArcs.Remove((CharacterStoryArc)entity);
 }
 public void Add(ICharacterStoryArc entity)
 {
     Context.CharacterStoryArcs.Add((CharacterStoryArc)entity);
 }
 protected bool Remove(ICharacterStoryArc entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     CharacterStoryArcsRepository.Remove(entity);
     // Try to Save Changes
     CharacterStoryArcsRepository.SaveChanges();
     // Finished!
     return true;
 }
 protected bool Deactivate(ICharacterStoryArc entity)
 {
     // Deactivate it
     CharacterStoryArcsRepository.Deactivate(entity);
     // Try to Save Changes
     CharacterStoryArcsRepository.SaveChanges();
     // Finished!
     return true;
 }
 public void Deactivate(ICharacterStoryArc entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Remove(ICharacterStoryArc entity)
 {
     Context.CharacterStoryArcs.Remove((CharacterStoryArc)entity);
 }
 public void Update(ICharacterStoryArc entity)
 {
     Context.SetModified(entity);
 }
 public void Deactivate(ICharacterStoryArc entity)
 {
     entity.Active = false;
     Update(entity);
 }