예제 #1
0
 protected bool Deactivate(IVolumeLocation entity)
 {
     // Deactivate it
     VolumeLocationsRepository.Deactivate(entity);
     // Try to Save Changes
     VolumeLocationsRepository.SaveChanges();
     // Finished!
     return(true);
 }
 public virtual bool AreEqual(IVolumeLocationModel model, IVolumeLocation entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // VolumeLocation Properties
         // <None>
         // Related Objects
         && model.VolumeId == entity.VolumeId
         && model.LocationId == entity.LocationId
         ;
 }
예제 #3
0
 public virtual bool AreEqual(IVolumeLocationModel model, IVolumeLocation entity)
 {
     return(EntityMapper.AreEqual(model, entity)
            // VolumeLocation Properties
            // <None>
            // Related Objects
            && model.VolumeId == entity.VolumeId &&
            model.LocationId == entity.LocationId
            );
 }
예제 #4
0
        public virtual IVolumeLocationModel MapToModelListing(IVolumeLocation entity, int currentDepth = 1)
        {
            currentDepth++;
            var model = EntityMapper.MapToModelListing <IVolumeLocation, VolumeLocationModel>(entity);

            // VolumeLocation Properties
            // <None>
            // Related Objects
            model.VolumeId   = entity.VolumeId;
            model.LocationId = entity.LocationId;
            // Return Entity
            return(model);
        }
예제 #5
0
 protected bool Remove(IVolumeLocation entity)
 {
     if (entity == null)
     {
         return(true);
     }                                    // No entity found to remove, consider it passed
     // Remove it
     VolumeLocationsRepository.Remove(entity);
     // Try to Save Changes
     VolumeLocationsRepository.SaveChanges();
     // Finished!
     return(true);
 }
 public virtual void MapToEntity(IVolumeLocationModel model, ref IVolumeLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // VolumeLocation Properties
     // <None>
     // Related Objects
     entity.VolumeId = model.VolumeId;
     entity.Volume = (Volume)model.Volume?.MapToEntity();
     entity.LocationId = model.LocationId;
     entity.Location = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
예제 #7
0
 public virtual void MapToEntity(IVolumeLocationModel model, ref IVolumeLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // VolumeLocation Properties
     // <None>
     // Related Objects
     entity.VolumeId   = model.VolumeId;
     entity.Volume     = (Volume)model.Volume?.MapToEntity();
     entity.LocationId = model.LocationId;
     entity.Location   = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual IVolumeLocationModel MapToModel(IVolumeLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<IVolumeLocation, VolumeLocationModel>(entity);
     // VolumeLocation Properties
     // <None>
     // Related Objects
     model.VolumeId = entity.VolumeId;
     model.Volume = entity.Volume?.MapToModel();
     model.LocationId = entity.LocationId;
     model.Location = entity.Location?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
 public void Add(IVolumeLocation entity)
 {
     Context.VolumeLocations.Add((VolumeLocation)entity);
 }
 public void Update(IVolumeLocation entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(IVolumeLocation entity)
 {
     Context.VolumeLocations.Remove((VolumeLocation)entity);
 }
 public void Deactivate(IVolumeLocation entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Update(IVolumeLocation entity)
 {
     Context.SetModified(entity);
 }
 public void Add(IVolumeLocation entity)
 {
     Context.VolumeLocations.Add((VolumeLocation)entity);
 }
 public static void MapToEntity(this IVolumeLocationModel model, ref IVolumeLocation entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
예제 #16
0
 public static bool AreEqual(this IVolumeLocationModel model, IVolumeLocation entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
예제 #17
0
 public static void MapToEntity(this IVolumeLocationModel model, ref IVolumeLocation entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 protected bool Remove(IVolumeLocation entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     VolumeLocationsRepository.Remove(entity);
     // Try to Save Changes
     VolumeLocationsRepository.SaveChanges();
     // Finished!
     return true;
 }
 protected bool Deactivate(IVolumeLocation entity)
 {
     // Deactivate it
     VolumeLocationsRepository.Deactivate(entity);
     // Try to Save Changes
     VolumeLocationsRepository.SaveChanges();
     // Finished!
     return true;
 }
예제 #20
0
 public static IVolumeLocationModel MapToModelListing(this IVolumeLocation entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
 public void Deactivate(IVolumeLocation entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Remove(IVolumeLocation entity)
 {
     Context.VolumeLocations.Remove((VolumeLocation)entity);
 }
 public static bool AreEqual(this IVolumeLocationModel model, IVolumeLocation entity)
 {
     return Mapper.AreEqual(model, entity);
 }