Ejemplo n.º 1
0
 protected bool Deactivate(IMovieLocation entity)
 {
     // Deactivate it
     MovieLocationsRepository.Deactivate(entity);
     // Try to Save Changes
     MovieLocationsRepository.SaveChanges();
     // Finished!
     return(true);
 }
 public virtual bool AreEqual(IMovieLocationModel model, IMovieLocation entity)
 {
     return(EntityMapper.AreEqual(model, entity)
            // MovieLocation Properties
            // <None>
            // Related Objects
            && model.MovieId == entity.MovieId &&
            model.LocationId == entity.LocationId
            );
 }
 public virtual bool AreEqual(IMovieLocationModel model, IMovieLocation entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // MovieLocation Properties
         // <None>
         // Related Objects
         && model.MovieId == entity.MovieId
         && model.LocationId == entity.LocationId
         ;
 }
Ejemplo n.º 4
0
 protected bool Remove(IMovieLocation entity)
 {
     if (entity == null)
     {
         return(true);
     }                                    // No entity found to remove, consider it passed
     // Remove it
     MovieLocationsRepository.Remove(entity);
     // Try to Save Changes
     MovieLocationsRepository.SaveChanges();
     // Finished!
     return(true);
 }
        public virtual IMovieLocationModel MapToModelListing(IMovieLocation entity, int currentDepth = 1)
        {
            currentDepth++;
            var model = EntityMapper.MapToModelListing <IMovieLocation, MovieLocationModel>(entity);

            // MovieLocation Properties
            // <None>
            // Related Objects
            model.MovieId    = entity.MovieId;
            model.LocationId = entity.LocationId;
            // Return Entity
            return(model);
        }
 public virtual void MapToEntity(IMovieLocationModel model, ref IMovieLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // MovieLocation Properties
     // <None>
     // Related Objects
     entity.MovieId    = model.MovieId;
     entity.Movie      = (Movie)model.Movie?.MapToEntity();
     entity.LocationId = model.LocationId;
     entity.Location   = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual void MapToEntity(IMovieLocationModel model, ref IMovieLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // MovieLocation Properties
     // <None>
     // Related Objects
     entity.MovieId = model.MovieId;
     entity.Movie = (Movie)model.Movie?.MapToEntity();
     entity.LocationId = model.LocationId;
     entity.Location = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual IMovieLocationModel MapToModel(IMovieLocation entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<IMovieLocation, MovieLocationModel>(entity);
     // MovieLocation Properties
     // <None>
     // Related Objects
     model.MovieId = entity.MovieId;
     model.Movie = entity.Movie?.MapToModel();
     model.LocationId = entity.LocationId;
     model.Location = entity.Location?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
Ejemplo n.º 9
0
 public void Update(IMovieLocation entity)
 {
     Context.SetModified(entity);
 }
Ejemplo n.º 10
0
 public void Deactivate(IMovieLocation entity)
 {
     entity.Active = false;
     Update(entity);
 }
Ejemplo n.º 11
0
 public void Remove(IMovieLocation entity)
 {
     Context.MovieLocations.Remove((MovieLocation)entity);
 }
Ejemplo n.º 12
0
 public void Add(IMovieLocation entity)
 {
     Context.MovieLocations.Add((MovieLocation)entity);
 }
 public void Add(IMovieLocation entity)
 {
     Context.MovieLocations.Add((MovieLocation)entity);
 }
 public static void MapToEntity(this IMovieLocationModel model, ref IMovieLocation entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 public static bool AreEqual(this IMovieLocationModel model, IMovieLocation entity)
 {
     return Mapper.AreEqual(model, entity);
 }
 public static IMovieLocationModel MapToModelListing(this IMovieLocation entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
 public static bool AreEqual(this IMovieLocationModel model, IMovieLocation entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
 public void Update(IMovieLocation entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(IMovieLocation entity)
 {
     Context.MovieLocations.Remove((MovieLocation)entity);
 }
 public void Deactivate(IMovieLocation entity)
 {
     entity.Active = false;
     Update(entity);
 }
 protected bool Deactivate(IMovieLocation entity)
 {
     // Deactivate it
     MovieLocationsRepository.Deactivate(entity);
     // Try to Save Changes
     MovieLocationsRepository.SaveChanges();
     // Finished!
     return true;
 }
 protected bool Remove(IMovieLocation entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     MovieLocationsRepository.Remove(entity);
     // Try to Save Changes
     MovieLocationsRepository.SaveChanges();
     // Finished!
     return true;
 }
 public static void MapToEntity(this IMovieLocationModel model, ref IMovieLocation entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }