public virtual bool AreEqual(ICharacterEnemyTeamModel model, ICharacterEnemyTeam entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // CharacterEnemyTeam Properties
         // <None>
         // Related Objects
         && model.CharacterId == entity.CharacterId
         && model.EnemyTeamId == entity.EnemyTeamId
         ;
 }
 public virtual void MapToEntity(ICharacterEnemyTeamModel model, ref ICharacterEnemyTeam entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // CharacterEnemyTeam Properties
     // <None>
     // Related Objects
     entity.CharacterId = model.CharacterId;
     entity.Character = (Character)model.Character?.MapToEntity();
     entity.EnemyTeamId = model.EnemyTeamId;
     entity.EnemyTeam = (Team)model.EnemyTeam?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual ICharacterEnemyTeamModel MapToModel(ICharacterEnemyTeam entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<ICharacterEnemyTeam, CharacterEnemyTeamModel>(entity);
     // CharacterEnemyTeam Properties
     // <None>
     // Related Objects
     model.CharacterId = entity.CharacterId;
     model.Character = entity.Character?.MapToModel();
     model.EnemyTeamId = entity.EnemyTeamId;
     model.EnemyTeam = entity.EnemyTeam?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
 public void Update(ICharacterEnemyTeam entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(ICharacterEnemyTeam entity)
 {
     Context.CharacterEnemyTeams.Remove((CharacterEnemyTeam)entity);
 }
 public void Deactivate(ICharacterEnemyTeam entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Add(ICharacterEnemyTeam entity)
 {
     Context.CharacterEnemyTeams.Add((CharacterEnemyTeam)entity);
 }
 public static void MapToEntity(this ICharacterEnemyTeamModel model, ref ICharacterEnemyTeam entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public static bool AreEqual(this ICharacterEnemyTeamModel model, ICharacterEnemyTeam entity)
 {
     return Mapper.AreEqual(model, entity);
 }
 protected bool Remove(ICharacterEnemyTeam entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     CharacterEnemyTeamsRepository.Remove(entity);
     // Try to Save Changes
     CharacterEnemyTeamsRepository.SaveChanges();
     // Finished!
     return true;
 }
 protected bool Deactivate(ICharacterEnemyTeam entity)
 {
     // Deactivate it
     CharacterEnemyTeamsRepository.Deactivate(entity);
     // Try to Save Changes
     CharacterEnemyTeamsRepository.SaveChanges();
     // Finished!
     return true;
 }