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