public virtual bool AreEqual(ITeamCharacterEnemyModel model, ITeamCharacterEnemy entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // TeamCharacterEnemy Properties
         // <None>
         // Related Objects
         && model.TeamId == entity.TeamId
         && model.EnemyId == entity.EnemyId
         ;
 }
 public virtual void MapToEntity(ITeamCharacterEnemyModel model, ref ITeamCharacterEnemy entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // TeamCharacterEnemy Properties
     // <None>
     // Related Objects
     entity.TeamId = model.TeamId;
     entity.Team = (Team)model.Team?.MapToEntity();
     entity.EnemyId = model.EnemyId;
     entity.Enemy = (Character)model.Enemy?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual ITeamCharacterEnemyModel MapToModel(ITeamCharacterEnemy entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<ITeamCharacterEnemy, TeamCharacterEnemyModel>(entity);
     // TeamCharacterEnemy Properties
     // <None>
     // Related Objects
     model.TeamId = entity.TeamId;
     model.Team = entity.Team?.MapToModel();
     model.EnemyId = entity.EnemyId;
     model.Enemy = entity.Enemy?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
 public void Update(ITeamCharacterEnemy entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(ITeamCharacterEnemy entity)
 {
     Context.TeamCharacterEnemies.Remove((TeamCharacterEnemy)entity);
 }
 public void Deactivate(ITeamCharacterEnemy entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Add(ITeamCharacterEnemy entity)
 {
     Context.TeamCharacterEnemies.Add((TeamCharacterEnemy)entity);
 }
 protected bool Remove(ITeamCharacterEnemy entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     TeamCharacterEnemiesRepository.Remove(entity);
     // Try to Save Changes
     TeamCharacterEnemiesRepository.SaveChanges();
     // Finished!
     return true;
 }
 protected bool Deactivate(ITeamCharacterEnemy entity)
 {
     // Deactivate it
     TeamCharacterEnemiesRepository.Deactivate(entity);
     // Try to Save Changes
     TeamCharacterEnemiesRepository.SaveChanges();
     // Finished!
     return true;
 }
 public static void MapToEntity(this ITeamCharacterEnemyModel model, ref ITeamCharacterEnemy entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public static bool AreEqual(this ITeamCharacterEnemyModel model, ITeamCharacterEnemy entity)
 {
     return Mapper.AreEqual(model, entity);
 }