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