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