protected bool Deactivate(IMovieWriter entity)
 {
     // Deactivate it
     MovieWritersRepository.Deactivate(entity);
     // Try to Save Changes
     MovieWritersRepository.SaveChanges();
     // Finished!
     return(true);
 }
コード例 #2
0
 public virtual bool AreEqual(IMovieWriterModel model, IMovieWriter entity)
 {
     return EntityMapper.AreEqual(model, entity)
         // MovieWriter Properties
         // <None>
         // Related Objects
         && model.MovieId == entity.MovieId
         && model.WriterId == entity.WriterId
         ;
 }
コード例 #3
0
 public virtual bool AreEqual(IMovieWriterModel model, IMovieWriter entity)
 {
     return(EntityMapper.AreEqual(model, entity)
            // MovieWriter Properties
            // <None>
            // Related Objects
            && model.MovieId == entity.MovieId &&
            model.WriterId == entity.WriterId
            );
 }
コード例 #4
0
        public virtual IMovieWriterModel MapToModelListing(IMovieWriter entity, int currentDepth = 1)
        {
            currentDepth++;
            var model = EntityMapper.MapToModelListing <IMovieWriter, MovieWriterModel>(entity);

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