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
         ;
 }
예제 #3
0
 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);
 }
예제 #5
0
        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>
 }
예제 #7
0
 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);
 }
예제 #10
0
 public void Update(IVolumeCharacter entity)
 {
     Context.SetModified(entity);
 }
예제 #11
0
 public void Remove(IVolumeCharacter entity)
 {
     Context.VolumeCharacters.Remove((VolumeCharacter)entity);
 }
예제 #12
0
 public void Deactivate(IVolumeCharacter entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Update(IVolumeCharacter entity)
 {
     Context.SetModified(entity);
 }
예제 #14
0
 public void Add(IVolumeCharacter entity)
 {
     Context.VolumeCharacters.Add((VolumeCharacter)entity);
 }
 public static void MapToEntity(this IVolumeCharacterModel model, ref IVolumeCharacter entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
예제 #16
0
 public static bool AreEqual(this IVolumeCharacterModel model, IVolumeCharacter entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
예제 #17
0
 public static void MapToEntity(this IVolumeCharacterModel model, ref IVolumeCharacter entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 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;
 }
예제 #20
0
 public static IVolumeCharacterModel MapToModelListing(this IVolumeCharacter entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
 public void Deactivate(IVolumeCharacter entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Remove(IVolumeCharacter entity)
 {
     Context.VolumeCharacters.Remove((VolumeCharacter)entity);
 }
 public static bool AreEqual(this IVolumeCharacterModel model, IVolumeCharacter entity)
 {
     return Mapper.AreEqual(model, entity);
 }