protected bool Deactivate(IMovieProducer entity)
 {
     // Deactivate it
     MovieProducersRepository.Deactivate(entity);
     // Try to Save Changes
     MovieProducersRepository.SaveChanges();
     // Finished!
     return(true);
 }
コード例 #2
0
 public virtual bool AreEqual(IMovieProducerModel model, IMovieProducer entity)
 {
     return(EntityMapper.AreEqual(model, entity)
            // MovieProducer Properties
            // <None>
            // Related Objects
            && model.MovieId == entity.MovieId &&
            model.ProducerId == entity.ProducerId
            );
 }
コード例 #3
0
 public virtual bool AreEqual(IMovieProducerModel model, IMovieProducer entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // MovieProducer Properties
         // <None>
         // Related Objects
         && model.MovieId == entity.MovieId
         && model.ProducerId == entity.ProducerId
         ;
 }
 protected bool Remove(IMovieProducer entity)
 {
     if (entity == null)
     {
         return(true);
     }                                    // No entity found to remove, consider it passed
     // Remove it
     MovieProducersRepository.Remove(entity);
     // Try to Save Changes
     MovieProducersRepository.SaveChanges();
     // Finished!
     return(true);
 }
コード例 #5
0
        public virtual IMovieProducerModel MapToModelListing(IMovieProducer entity, int currentDepth = 1)
        {
            currentDepth++;
            var model = EntityMapper.MapToModelListing <IMovieProducer, MovieProducerModel>(entity);

            // MovieProducer Properties
            // <None>
            // Related Objects
            model.MovieId    = entity.MovieId;
            model.ProducerId = entity.ProducerId;
            // Return Entity
            return(model);
        }
コード例 #6
0
 public virtual void MapToEntity(IMovieProducerModel model, ref IMovieProducer entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // MovieProducer Properties
     // <None>
     // Related Objects
     entity.MovieId = model.MovieId;
     entity.Movie = (Movie)model.Movie?.MapToEntity();
     entity.ProducerId = model.ProducerId;
     entity.Producer = (Person)model.Producer?.MapToEntity();
     // Associated Objects
     // <None>
 }
コード例 #7
0
 public virtual void MapToEntity(IMovieProducerModel model, ref IMovieProducer entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     EntityMapper.MapToEntity(model, ref entity);
     // MovieProducer Properties
     // <None>
     // Related Objects
     entity.MovieId    = model.MovieId;
     entity.Movie      = (Movie)model.Movie?.MapToEntity();
     entity.ProducerId = model.ProducerId;
     entity.Producer   = (Person)model.Producer?.MapToEntity();
     // Associated Objects
     // <None>
 }
コード例 #8
0
 public virtual IMovieProducerModel MapToModel(IMovieProducer entity, int currentDepth = 1)
 {
     currentDepth++;
     var model = EntityMapper.MapToModel<IMovieProducer, MovieProducerModel>(entity);
     // MovieProducer Properties
     // <None>
     // Related Objects
     model.MovieId = entity.MovieId;
     model.Movie = entity.Movie?.MapToModel();
     model.ProducerId = entity.ProducerId;
     model.Producer = entity.Producer?.MapToModel();
     // Associated Objects
     // <None>
     // Return Entity
     return model;
 }
コード例 #9
0
 public void Remove(IMovieProducer entity)
 {
     Context.MovieProducers.Remove((MovieProducer)entity);
 }
コード例 #10
0
 public static bool AreEqual(this IMovieProducerModel model, IMovieProducer entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
コード例 #11
0
 public static IMovieProducerModel MapToModelListing(this IMovieProducer entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
コード例 #12
0
 public static void MapToEntity(this IMovieProducerModel model, ref IMovieProducer entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
コード例 #13
0
 public static void MapToEntity(this IMovieProducerModel model, ref IMovieProducer entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
 protected bool Deactivate(IMovieProducer entity)
 {
     // Deactivate it
     MovieProducersRepository.Deactivate(entity);
     // Try to Save Changes
     MovieProducersRepository.SaveChanges();
     // Finished!
     return true;
 }
コード例 #15
0
 public void Remove(IMovieProducer entity)
 {
     Context.MovieProducers.Remove((MovieProducer)entity);
 }
コード例 #16
0
 public void Add(IMovieProducer entity)
 {
     Context.MovieProducers.Add((MovieProducer)entity);
 }
コード例 #17
0
 public void Add(IMovieProducer entity)
 {
     Context.MovieProducers.Add((MovieProducer)entity);
 }
コード例 #18
0
 public void Deactivate(IMovieProducer entity)
 {
     entity.Active = false;
     Update(entity);
 }
コード例 #19
0
 public void Deactivate(IMovieProducer entity)
 {
     entity.Active = false;
     Update(entity);
 }
コード例 #20
0
 public void Update(IMovieProducer entity)
 {
     Context.SetModified(entity);
 }
コード例 #21
0
 public void Update(IMovieProducer entity)
 {
     Context.SetModified(entity);
 }
 protected bool Remove(IMovieProducer entity)
 {
     if (entity == null) { return true; } // No entity found to remove, consider it passed
     // Remove it
     MovieProducersRepository.Remove(entity);
     // Try to Save Changes
     MovieProducersRepository.SaveChanges();
     // Finished!
     return true;
 }
コード例 #23
0
 public static bool AreEqual(this IMovieProducerModel model, IMovieProducer entity)
 {
     return Mapper.AreEqual(model, entity);
 }