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