public virtual bool AreEqual(IEpisodeLocationFirstAppearanceModel model, IEpisodeLocationFirstAppearance entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // EpisodeLocationFirstAppearance Properties
         // <None>
         // Related Objects
         && model.EpisodeId == entity.EpisodeId
         && model.LocationId == entity.LocationId
         ;
 }
 public virtual void MapToEntity(IEpisodeLocationFirstAppearanceModel model, ref IEpisodeLocationFirstAppearance entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // EpisodeLocationFirstAppearance Properties
     // <None>
     // Related Objects
     entity.EpisodeId = model.EpisodeId;
     entity.Episode = (Episode)model.Episode?.MapToEntity();
     entity.LocationId = model.LocationId;
     entity.Location = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual IEpisodeLocationFirstAppearanceModel MapToModel(IEpisodeLocationFirstAppearance entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<IEpisodeLocationFirstAppearance, EpisodeLocationFirstAppearanceModel>(entity);
     // EpisodeLocationFirstAppearance Properties
     // <None>
     // Related Objects
     model.EpisodeId = entity.EpisodeId;
     model.Episode = entity.Episode?.MapToModel();
     model.LocationId = entity.LocationId;
     model.Location = entity.Location?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
 public static void MapToEntity(this IEpisodeLocationFirstAppearanceModel model, ref IEpisodeLocationFirstAppearance entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 protected bool Remove(IEpisodeLocationFirstAppearance entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     EpisodeLocationFirstAppearancesRepository.Remove(entity);
     // Try to Save Changes
     EpisodeLocationFirstAppearancesRepository.SaveChanges();
     // Finished!
     return true;
 }
 public static bool AreEqual(this IEpisodeLocationFirstAppearanceModel model, IEpisodeLocationFirstAppearance entity)
 {
     return Mapper.AreEqual(model, entity);
 }
 protected bool Deactivate(IEpisodeLocationFirstAppearance entity)
 {
     // Deactivate it
     EpisodeLocationFirstAppearancesRepository.Deactivate(entity);
     // Try to Save Changes
     EpisodeLocationFirstAppearancesRepository.SaveChanges();
     // Finished!
     return true;
 }
 public void Update(IEpisodeLocationFirstAppearance entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(IEpisodeLocationFirstAppearance entity)
 {
     Context.EpisodeLocationFirstAppearances.Remove((EpisodeLocationFirstAppearance)entity);
 }
 public void Deactivate(IEpisodeLocationFirstAppearance entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Add(IEpisodeLocationFirstAppearance entity)
 {
     Context.EpisodeLocationFirstAppearances.Add((EpisodeLocationFirstAppearance)entity);
 }