コード例 #1
0
 protected bool Deactivate(IMovieTeam entity)
 {
     // Deactivate it
     MovieTeamsRepository.Deactivate(entity);
     // Try to Save Changes
     MovieTeamsRepository.SaveChanges();
     // Finished!
     return(true);
 }
コード例 #2
0
 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
            );
 }
コード例 #3
0
 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
         ;
 }
コード例 #4
0
 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);
 }
コード例 #5
0
        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);
        }
コード例 #6
0
 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>
 }
コード例 #7
0
 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>
 }
コード例 #8
0
 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;
 }
コード例 #9
0
 public void Deactivate(IMovieTeam entity)
 {
     entity.Active = false;
     Update(entity);
 }
コード例 #10
0
 public void Update(IMovieTeam entity)
 {
     Context.SetModified(entity);
 }
コード例 #11
0
 public void Add(IMovieTeam entity)
 {
     Context.MovieTeams.Add((MovieTeam)entity);
 }
コード例 #12
0
 public void Remove(IMovieTeam entity)
 {
     Context.MovieTeams.Remove((MovieTeam)entity);
 }
コード例 #13
0
 public void Remove(IMovieTeam entity)
 {
     Context.MovieTeams.Remove((MovieTeam)entity);
 }
コード例 #14
0
 public void Update(IMovieTeam entity)
 {
     Context.SetModified(entity);
 }
コード例 #15
0
 public void Add(IMovieTeam entity)
 {
     Context.MovieTeams.Add((MovieTeam)entity);
 }
コード例 #16
0
 public void Deactivate(IMovieTeam entity)
 {
     entity.Active = false;
     Update(entity);
 }
コード例 #17
0
 public static void MapToEntity(this IMovieTeamModel model, ref IMovieTeam entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }
コード例 #18
0
 public static IMovieTeamModel MapToModelListing(this IMovieTeam entity, int currentDepth = 1)
 {
     return(Mapper.MapToModelListing(entity, currentDepth));
 }
コード例 #19
0
 public static bool AreEqual(this IMovieTeamModel model, IMovieTeam entity)
 {
     return(Mapper.AreEqual(model, entity));
 }
コード例 #20
0
 public static bool AreEqual(this IMovieTeamModel model, IMovieTeam entity)
 {
     return Mapper.AreEqual(model, entity);
 }
コード例 #21
0
 public static void MapToEntity(this IMovieTeamModel model, ref IMovieTeam entity, int currentDepth = 1)
 {
     Mapper.MapToEntity(model, ref entity, currentDepth);
 }