protected bool Deactivate(IMovieWriter entity)
 {
     // Deactivate it
     MovieWritersRepository.Deactivate(entity);
     // Try to Save Changes
     MovieWritersRepository.SaveChanges();
     // Finished!
     return(true);
 }
 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
         ;
 }
Esempio n. 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
            );
 }
Esempio n. 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);
 }
 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>
 }
Esempio n. 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>
 }
 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;
 }
Esempio n. 9
0
 public void Remove(IMovieWriter entity)
 {
     Context.MovieWriters.Remove((MovieWriter)entity);
 }
Esempio n. 10
0
 public void Add(IMovieWriter entity)
 {
     Context.MovieWriters.Add((MovieWriter)entity);
 }
Esempio n. 11
0
 public static bool AreEqual(this IMovieWriterModel model, IMovieWriter entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
Esempio n. 12
0
 public static IMovieWriterModel MapToModelListing(this IMovieWriter entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
 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;
 }
Esempio n. 15
0
 public void Deactivate(IMovieWriter entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Update(IMovieWriter entity)
 {
     Context.SetModified(entity);
 }
 public void Remove(IMovieWriter entity)
 {
     Context.MovieWriters.Remove((MovieWriter)entity);
 }
 public void Deactivate(IMovieWriter entity)
 {
     entity.Active = false;
     Update(entity);
 }
 public void Add(IMovieWriter entity)
 {
     Context.MovieWriters.Add((MovieWriter)entity);
 }
Esempio n. 20
0
 public void Update(IMovieWriter entity)
 {
     Context.SetModified(entity);
 }
Esempio n. 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;
 }
 public static bool AreEqual(this IMovieWriterModel model, IMovieWriter entity)
 {
     return Mapper.AreEqual(model, entity);
 }