protected bool Deactivate(ICharacterMovie entity) { // Deactivate it CharacterMoviesRepository.Deactivate(entity); // Try to Save Changes CharacterMoviesRepository.SaveChanges(); // Finished! return(true); }
public virtual bool AreEqual(ICharacterMovieModel model, ICharacterMovie entity) { return EntityMapper.AreEqual(model, entity) // CharacterMovie Properties // <None> // Related Objects && model.CharacterId == entity.CharacterId && model.MovieId == entity.MovieId ; }
public virtual bool AreEqual(ICharacterMovieModel model, ICharacterMovie entity) { return(EntityMapper.AreEqual(model, entity) // CharacterMovie Properties // <None> // Related Objects && model.CharacterId == entity.CharacterId && model.MovieId == entity.MovieId ); }
protected bool Remove(ICharacterMovie entity) { if (entity == null) { return(true); } // No entity found to remove, consider it passed // Remove it CharacterMoviesRepository.Remove(entity); // Try to Save Changes CharacterMoviesRepository.SaveChanges(); // Finished! return(true); }
public virtual ICharacterMovieModel MapToModelListing(ICharacterMovie entity, int currentDepth = 1) { currentDepth++; var model = EntityMapper.MapToModelListing <ICharacterMovie, CharacterMovieModel>(entity); // CharacterMovie Properties // <None> // Related Objects model.CharacterId = entity.CharacterId; model.MovieId = entity.MovieId; // Return Entity return(model); }
public virtual void MapToEntity(ICharacterMovieModel model, ref ICharacterMovie entity, int currentDepth = 1) { currentDepth++; // Assign Base properties EntityMapper.MapToEntity(model, ref entity); // CharacterMovie Properties // <None> // Related Objects entity.CharacterId = model.CharacterId; entity.Character = (Character)model.Character?.MapToEntity(); entity.MovieId = model.MovieId; entity.Movie = (Movie)model.Movie?.MapToEntity(); // Associated Objects // <None> }
public virtual ICharacterMovieModel MapToModel(ICharacterMovie entity, int currentDepth = 1) { currentDepth++; var model = EntityMapper.MapToModel<ICharacterMovie, CharacterMovieModel>(entity); // CharacterMovie Properties // <None> // Related Objects model.CharacterId = entity.CharacterId; model.Character = entity.Character?.MapToModel(); model.MovieId = entity.MovieId; model.Movie = entity.Movie?.MapToModel(); // Associated Objects // <None> // Return Entity return model; }
public static void MapToEntity(this ICharacterMovieModel model, ref ICharacterMovie entity, int currentDepth = 1) { Mapper.MapToEntity(model, ref entity, currentDepth); }
protected bool Deactivate(ICharacterMovie entity) { // Deactivate it CharacterMoviesRepository.Deactivate(entity); // Try to Save Changes CharacterMoviesRepository.SaveChanges(); // Finished! return true; }
protected bool Remove(ICharacterMovie entity) { if (entity == null) { return true; } // No entity found to remove, consider it passed // Remove it CharacterMoviesRepository.Remove(entity); // Try to Save Changes CharacterMoviesRepository.SaveChanges(); // Finished! return true; }
public void Remove(ICharacterMovie entity) { Context.CharacterMovies.Remove((CharacterMovie)entity); }
public void Update(ICharacterMovie entity) { Context.SetModified(entity); }
public void Add(ICharacterMovie entity) { Context.CharacterMovies.Add((CharacterMovie)entity); }
public void Deactivate(ICharacterMovie entity) { entity.Active = false; Update(entity); }
public static ICharacterMovieModel MapToModelListing(this ICharacterMovie entity, int currentDepth = 1) { return(Mapper.MapToModelListing(entity, currentDepth)); }
public static bool AreEqual(this ICharacterMovieModel model, ICharacterMovie entity) { return(Mapper.AreEqual(model, entity)); }
public static bool AreEqual(this ICharacterMovieModel model, ICharacterMovie entity) { return Mapper.AreEqual(model, entity); }