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 ; }
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 ); }
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); }
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> }
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 static void MapToEntity(this IVolumeLocationModel model, ref IVolumeLocation entity, int currentDepth = 1) { Mapper.MapToEntity(model, ref entity, currentDepth); }
public static bool AreEqual(this IVolumeLocationModel model, IVolumeLocation entity) { return(Mapper.AreEqual(model, entity)); }
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; }
public static IVolumeLocationModel MapToModelListing(this IVolumeLocation entity, int currentDepth = 1) { return(Mapper.MapToModelListing(entity, currentDepth)); }
public static bool AreEqual(this IVolumeLocationModel model, IVolumeLocation entity) { return Mapper.AreEqual(model, entity); }