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