protected bool Deactivate(ISeriesLocation entity)
 {
     // Deactivate it
     SeriesLocationsRepository.Deactivate(entity);
     // Try to Save Changes
     SeriesLocationsRepository.SaveChanges();
     // Finished!
     return(true);
 }
 public virtual bool AreEqual(ISeriesLocationModel model, ISeriesLocation entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // SeriesLocation Properties
         // <None>
         // Related Objects
         && model.SeriesId == entity.SeriesId
         && model.LocationId == entity.LocationId
         ;
 }
 public virtual bool AreEqual(ISeriesLocationModel model, ISeriesLocation entity)
 {
     return(EntityMapper.AreEqual(model, entity)
            // SeriesLocation Properties
            // <None>
            // Related Objects
            && model.SeriesId == entity.SeriesId &&
            model.LocationId == entity.LocationId
            );
 }
 protected bool Remove(ISeriesLocation entity)
 {
     if (entity == null)
     {
         return(true);
     }                                    // No entity found to remove, consider it passed
     // Remove it
     SeriesLocationsRepository.Remove(entity);
     // Try to Save Changes
     SeriesLocationsRepository.SaveChanges();
     // Finished!
     return(true);
 }
        public virtual ISeriesLocationModel MapToModelListing(ISeriesLocation entity, int currentDepth = 1)
        {
            currentDepth++;
            var model = EntityMapper.MapToModelListing <ISeriesLocation, SeriesLocationModel>(entity);

            // SeriesLocation Properties
            // <None>
            // Related Objects
            model.SeriesId   = entity.SeriesId;
            model.LocationId = entity.LocationId;
            // Return Entity
            return(model);
        }
 public virtual void MapToEntity(ISeriesLocationModel model, ref ISeriesLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // SeriesLocation Properties
     // <None>
     // Related Objects
     entity.SeriesId = model.SeriesId;
     entity.Series = (Series)model.Series?.MapToEntity();
     entity.LocationId = model.LocationId;
     entity.Location = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual void MapToEntity(ISeriesLocationModel model, ref ISeriesLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // SeriesLocation Properties
     // <None>
     // Related Objects
     entity.SeriesId   = model.SeriesId;
     entity.Series     = (Series)model.Series?.MapToEntity();
     entity.LocationId = model.LocationId;
     entity.Location   = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual ISeriesLocationModel MapToModel(ISeriesLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<ISeriesLocation, SeriesLocationModel>(entity);
     // SeriesLocation Properties
     // <None>
     // Related Objects
     model.SeriesId = entity.SeriesId;
     model.Series = entity.Series?.MapToModel();
     model.LocationId = entity.LocationId;
     model.Location = entity.Location?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
 public static void MapToEntity(this ISeriesLocationModel model, ref ISeriesLocation entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 protected bool Remove(ISeriesLocation entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     SeriesLocationsRepository.Remove(entity);
     // Try to Save Changes
     SeriesLocationsRepository.SaveChanges();
     // Finished!
     return true;
 }
 public static void MapToEntity(this ISeriesLocationModel model, ref ISeriesLocation entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public static ISeriesLocationModel MapToModelListing(this ISeriesLocation entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
Exemple #13
0
 public void Update(ISeriesLocation entity)
 {
     Context.SetModified(entity);
 }
 public static bool AreEqual(this ISeriesLocationModel model, ISeriesLocation entity)
 {
     return Mapper.AreEqual(model, entity);
 }
Exemple #15
0
 public void Deactivate(ISeriesLocation entity)
 {
     entity.Active = false;
     Update(entity);
 }
Exemple #16
0
 public void Remove(ISeriesLocation entity)
 {
     Context.SeriesLocations.Remove((SeriesLocation)entity);
 }
Exemple #17
0
 public void Add(ISeriesLocation entity)
 {
     Context.SeriesLocations.Add((SeriesLocation)entity);
 }
 public static bool AreEqual(this ISeriesLocationModel model, ISeriesLocation entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
 protected bool Deactivate(ISeriesLocation entity)
 {
     // Deactivate it
     SeriesLocationsRepository.Deactivate(entity);
     // Try to Save Changes
     SeriesLocationsRepository.SaveChanges();
     // Finished!
     return true;
 }