protected bool Deactivate(ITeamCharacterEnemy entity) { // Deactivate it TeamCharacterEnemiesRepository.Deactivate(entity); // Try to Save Changes TeamCharacterEnemiesRepository.SaveChanges(); // Finished! return(true); }
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 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 ITeamCharacterEnemyModel MapToModelListing(ITeamCharacterEnemy entity, int currentDepth = 1) { currentDepth++; var model = EntityMapper.MapToModelListing <ITeamCharacterEnemy, TeamCharacterEnemyModel>(entity); // TeamCharacterEnemy Properties // <None> // Related Objects model.TeamId = entity.TeamId; model.EnemyId = entity.EnemyId; // Return Entity return(model); }
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); }
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 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 static ITeamCharacterEnemyModel MapToModelListing(this ITeamCharacterEnemy entity, int currentDepth = 1) { return(Mapper.MapToModelListing(entity, currentDepth)); }
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 static void MapToEntity(this ITeamCharacterEnemyModel model, ref ITeamCharacterEnemy entity, int currentDepth = 1) { Mapper.MapToEntity(model, ref entity, currentDepth); }
public void Remove(ITeamCharacterEnemy entity) { Context.TeamCharacterEnemies.Remove((TeamCharacterEnemy)entity); }
public void Add(ITeamCharacterEnemy entity) { Context.TeamCharacterEnemies.Add((TeamCharacterEnemy)entity); }
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); }
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; }
public static bool AreEqual(this ITeamCharacterEnemyModel model, ITeamCharacterEnemy entity) { return(Mapper.AreEqual(model, entity)); }
public void Deactivate(ITeamCharacterEnemy entity) { entity.Active = false; Update(entity); }
public void Add(ITeamCharacterEnemy entity) { Context.TeamCharacterEnemies.Add((TeamCharacterEnemy)entity); }
public void Update(ITeamCharacterEnemy entity) { Context.SetModified(entity); }
public static bool AreEqual(this ITeamCharacterEnemyModel model, ITeamCharacterEnemy entity) { return Mapper.AreEqual(model, entity); }