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