public virtual void MapToEntity(IImageFileModel model, ref IImageFile entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // ImageFile Properties
     // <None>
     // Related Objects
     // <None>
     // Associated Objects
     entity.Characters = model.Characters?.Where(i => i.Active).Select(CharacterMapperExtensions.MapToEntity).ToList();
     entity.Chats      = model.Chats?.Where(i => i.Active).Select(ChatMapperExtensions.MapToEntity).ToList();
     entity.Concepts   = model.Concepts?.Where(i => i.Active).Select(ConceptMapperExtensions.MapToEntity).ToList();
     entity.Episodes   = model.Episodes?.Where(i => i.Active).Select(EpisodeMapperExtensions.MapToEntity).ToList();
     entity.Issues     = model.Issues?.Where(i => i.Active).Select(IssueMapperExtensions.MapToEntity).ToList();
     entity.Locations  = model.Locations?.Where(i => i.Active).Select(LocationMapperExtensions.MapToEntity).ToList();
     entity.Movies     = model.Movies?.Where(i => i.Active).Select(MovieMapperExtensions.MapToEntity).ToList();
     entity.Objects    = model.Objects?.Where(i => i.Active).Select(ObjectMapperExtensions.MapToEntity).ToList();
     entity.People     = model.People?.Where(i => i.Active).Select(PersonMapperExtensions.MapToEntity).ToList();
     entity.Promos     = model.Promos?.Where(i => i.Active).Select(PromoMapperExtensions.MapToEntity).ToList();
     entity.Publishers = model.Publishers?.Where(i => i.Active).Select(PublisherMapperExtensions.MapToEntity).ToList();
     entity.StoryArcs  = model.StoryArcs?.Where(i => i.Active).Select(StoryArcMapperExtensions.MapToEntity).ToList();
     entity.Teams      = model.Teams?.Where(i => i.Active).Select(TeamMapperExtensions.MapToEntity).ToList();
     entity.Videos     = model.Videos?.Where(i => i.Active).Select(VideoMapperExtensions.MapToEntity).ToList();
     entity.Volumes    = model.Volumes?.Where(i => i.Active).Select(VolumeMapperExtensions.MapToEntity).ToList();
 }
示例#2
0
        public virtual IEpisode MapToEntity(IEpisodeModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <Episode, IEpisodeModel>(model);

            // Episode Properties
            entity.HasStaffReview = model.HasStaffReview;
            entity.AirDate        = model.AirDate;
            entity.EpisodeCode    = model.EpisodeCode;
            entity.SeasonNumber   = model.SeasonNumber;
            entity.EpisodeNumber  = model.EpisodeNumber;
            // Related Objects
            entity.PrimaryImageFileId = model.PrimaryImageFileId;
            entity.PrimaryImageFile   = (ImageFile)model.PrimaryImageFile?.MapToEntity();
            entity.SeriesId           = model.SeriesId;
            entity.Series             = (Series)model.Series?.MapToEntity();
            // Associated Objects
            entity.EpisodeAliases                   = model.EpisodeAliases?.Where(i => i.Active).Select(EpisodeAliasMapperExtensions.MapToEntity).Cast <EpisodeAlias>().ToList();
            entity.EpisodeCharacters                = model.EpisodeCharacters?.Where(i => i.Active).Select(EpisodeCharacterMapperExtensions.MapToEntity).Cast <EpisodeCharacter>().ToList();
            entity.EpisodeCharactersDied            = model.EpisodeCharactersDied?.Where(i => i.Active).Select(EpisodeCharacterDiedMapperExtensions.MapToEntity).Cast <EpisodeCharacterDied>().ToList();
            entity.EpisodeCharacterFirstAppearances = model.EpisodeCharacterFirstAppearances?.Where(i => i.Active).Select(EpisodeCharacterFirstAppearanceMapperExtensions.MapToEntity).Cast <EpisodeCharacterFirstAppearance>().ToList();
            entity.EpisodeConcepts                  = model.EpisodeConcepts?.Where(i => i.Active).Select(EpisodeConceptMapperExtensions.MapToEntity).Cast <EpisodeConcept>().ToList();
            entity.EpisodeConceptFirstAppearances   = model.EpisodeConceptFirstAppearances?.Where(i => i.Active).Select(EpisodeConceptFirstAppearanceMapperExtensions.MapToEntity).Cast <EpisodeConceptFirstAppearance>().ToList();
            entity.EpisodeLocations                 = model.EpisodeLocations?.Where(i => i.Active).Select(EpisodeLocationMapperExtensions.MapToEntity).Cast <EpisodeLocation>().ToList();
            entity.EpisodeLocationFirstAppearances  = model.EpisodeLocationFirstAppearances?.Where(i => i.Active).Select(EpisodeLocationFirstAppearanceMapperExtensions.MapToEntity).Cast <EpisodeLocationFirstAppearance>().ToList();
            entity.EpisodeObjects                   = model.EpisodeObjects?.Where(i => i.Active).Select(EpisodeObjectMapperExtensions.MapToEntity).Cast <EpisodeObject>().ToList();
            entity.EpisodeObjectFirstAppearances    = model.EpisodeObjectFirstAppearances?.Where(i => i.Active).Select(EpisodeObjectFirstAppearanceMapperExtensions.MapToEntity).Cast <EpisodeObjectFirstAppearance>().ToList();
            entity.EpisodePeople    = model.EpisodePeople?.Where(i => i.Active).Select(EpisodePersonMapperExtensions.MapToEntity).Cast <EpisodePerson>().ToList();
            entity.EpisodeStoryArcs = model.EpisodeStoryArcs?.Where(i => i.Active).Select(EpisodeStoryArcMapperExtensions.MapToEntity).Cast <EpisodeStoryArc>().ToList();
            entity.EpisodeStoryArcFirstAppearances = model.EpisodeStoryArcFirstAppearances?.Where(i => i.Active).Select(EpisodeStoryArcFirstAppearanceMapperExtensions.MapToEntity).Cast <EpisodeStoryArcFirstAppearance>().ToList();
            entity.EpisodeTeams = model.EpisodeTeams?.Where(i => i.Active).Select(EpisodeTeamMapperExtensions.MapToEntity).Cast <EpisodeTeam>().ToList();
            entity.EpisodeTeamFirstAppearances = model.EpisodeTeamFirstAppearances?.Where(i => i.Active).Select(EpisodeTeamFirstAppearanceMapperExtensions.MapToEntity).Cast <EpisodeTeamFirstAppearance>().ToList();
            // Return Entity
            return(entity);
        }
 public virtual void MapToEntity(ITeamModel model, ref ITeam entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Team Properties
     // <None>
     // Related Objects
     entity.PrimaryImageFileId     = model.PrimaryImageFileId;
     entity.PrimaryImageFile       = (ImageFile)model.PrimaryImageFile?.MapToEntity();
     entity.FirstIssueAppearanceId = model.FirstIssueAppearanceId;
     entity.FirstIssueAppearance   = (Issue)model.FirstIssueAppearance?.MapToEntity();
     entity.PublisherId            = model.PublisherId;
     entity.Publisher = (Publisher)model.Publisher?.MapToEntity();
     // Associated Objects
     entity.TeamAliases           = model.TeamAliases?.Where(i => i.Active).Select(TeamAliasMapperExtensions.MapToEntity).ToList();
     entity.TeamCharacterEnemies  = model.TeamCharacterEnemies?.Where(i => i.Active).Select(TeamCharacterEnemyMapperExtensions.MapToEntity).ToList();
     entity.TeamCharacterFriends  = model.TeamCharacterFriends?.Where(i => i.Active).Select(TeamCharacterFriendMapperExtensions.MapToEntity).ToList();
     entity.TeamIssuesAppearedIn  = model.TeamIssuesAppearedIn?.Where(i => i.Active).Select(TeamAppearedInIssueMapperExtensions.MapToEntity).ToList();
     entity.TeamIssuesDisbandedIn = model.TeamIssuesDisbandedIn?.Where(i => i.Active).Select(TeamDisbandedInIssueMapperExtensions.MapToEntity).ToList();
     entity.TeamIssues            = model.TeamIssues?.Where(i => i.Active).Select(TeamIssueMapperExtensions.MapToEntity).ToList();
     entity.TeamMembers           = model.TeamMembers?.Where(i => i.Active).Select(TeamMemberMapperExtensions.MapToEntity).ToList();
     entity.TeamMovies            = model.TeamMovies?.Where(i => i.Active).Select(TeamMovieMapperExtensions.MapToEntity).ToList();
     entity.TeamStoryArcs         = model.TeamStoryArcs?.Where(i => i.Active).Select(TeamStoryArcMapperExtensions.MapToEntity).ToList();
     entity.TeamVolumes           = model.TeamVolumes?.Where(i => i.Active).Select(TeamVolumeMapperExtensions.MapToEntity).ToList();
 }
示例#4
0
 public virtual void MapToEntity(IMovieModel model, ref IMovie entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Movie Properties
     entity.HasStaffReview   = model.HasStaffReview;
     entity.Distributor      = model.Distributor;
     entity.BoxOfficeRevenue = model.BoxOfficeRevenue;
     entity.TotalRevenue     = model.TotalRevenue;
     entity.Budget           = model.Budget;
     entity.Rating           = model.Rating;
     entity.ReleaseDate      = model.ReleaseDate;
     entity.RunTime          = model.RunTime;
     // Related Objects
     entity.PrimaryImageFileId = model.PrimaryImageFileId;
     entity.PrimaryImageFile   = (ImageFile)model.PrimaryImageFile?.MapToEntity();
     // Associated Objects
     entity.MovieCharacters = model.MovieCharacters?.Where(i => i.Active).Select(MovieCharacterMapperExtensions.MapToEntity).ToList();
     entity.MovieConcepts   = model.MovieConcepts?.Where(i => i.Active).Select(MovieConceptMapperExtensions.MapToEntity).ToList();
     entity.MovieLocations  = model.MovieLocations?.Where(i => i.Active).Select(MovieLocationMapperExtensions.MapToEntity).ToList();
     entity.MovieObjects    = model.MovieObjects?.Where(i => i.Active).Select(MovieObjectMapperExtensions.MapToEntity).ToList();
     entity.MovieProducers  = model.MovieProducers?.Where(i => i.Active).Select(MovieProducerMapperExtensions.MapToEntity).ToList();
     entity.MovieStoryArcs  = model.MovieStoryArcs?.Where(i => i.Active).Select(MovieStoryArcMapperExtensions.MapToEntity).ToList();
     entity.MovieStudios    = model.MovieStudios?.Where(i => i.Active).Select(MovieStudioMapperExtensions.MapToEntity).ToList();
     entity.MovieTeams      = model.MovieTeams?.Where(i => i.Active).Select(MovieTeamMapperExtensions.MapToEntity).ToList();
     entity.MovieWriters    = model.MovieWriters?.Where(i => i.Active).Select(MovieWriterMapperExtensions.MapToEntity).ToList();
 }
        public virtual IImageFile MapToEntity(IImageFileModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <ImageFile, IImageFileModel>(model);

            // ImageFile Properties
            // <None>
            // Related Objects
            // <None>
            // Associated Objects
            entity.Characters = model.Characters?.Where(i => i.Active).Select(CharacterMapperExtensions.MapToEntity).Cast <Character>().ToList();
            entity.Chats      = model.Chats?.Where(i => i.Active).Select(ChatMapperExtensions.MapToEntity).Cast <Chat>().ToList();
            entity.Concepts   = model.Concepts?.Where(i => i.Active).Select(ConceptMapperExtensions.MapToEntity).Cast <Concept>().ToList();
            entity.Episodes   = model.Episodes?.Where(i => i.Active).Select(EpisodeMapperExtensions.MapToEntity).Cast <Episode>().ToList();
            entity.Issues     = model.Issues?.Where(i => i.Active).Select(IssueMapperExtensions.MapToEntity).Cast <Issue>().ToList();
            entity.Locations  = model.Locations?.Where(i => i.Active).Select(LocationMapperExtensions.MapToEntity).Cast <Location>().ToList();
            entity.Movies     = model.Movies?.Where(i => i.Active).Select(MovieMapperExtensions.MapToEntity).Cast <Movie>().ToList();
            entity.Objects    = model.Objects?.Where(i => i.Active).Select(ObjectMapperExtensions.MapToEntity).Cast <Object>().ToList();
            entity.People     = model.People?.Where(i => i.Active).Select(PersonMapperExtensions.MapToEntity).Cast <Person>().ToList();
            entity.Promos     = model.Promos?.Where(i => i.Active).Select(PromoMapperExtensions.MapToEntity).Cast <Promo>().ToList();
            entity.Publishers = model.Publishers?.Where(i => i.Active).Select(PublisherMapperExtensions.MapToEntity).Cast <Publisher>().ToList();
            entity.StoryArcs  = model.StoryArcs?.Where(i => i.Active).Select(StoryArcMapperExtensions.MapToEntity).Cast <StoryArc>().ToList();
            entity.Teams      = model.Teams?.Where(i => i.Active).Select(TeamMapperExtensions.MapToEntity).Cast <Team>().ToList();
            entity.Videos     = model.Videos?.Where(i => i.Active).Select(VideoMapperExtensions.MapToEntity).Cast <Video>().ToList();
            entity.Volumes    = model.Volumes?.Where(i => i.Active).Select(VolumeMapperExtensions.MapToEntity).Cast <Volume>().ToList();
            // Return Entity
            return(entity);
        }
 public virtual void MapToEntity(ICharacterModel model, ref ICharacter entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Character Properties
     entity.RealName    = model.RealName;
     entity.DateOfBirth = model.DateOfBirth;
     // Related Objects
     entity.PrimaryImageFileId     = model.PrimaryImageFileId;
     entity.PrimaryImageFile       = (ImageFile)model.PrimaryImageFile?.MapToEntity();
     entity.FirstIssueAppearanceId = model.FirstIssueAppearanceId;
     entity.FirstIssueAppearance   = (Issue)model.FirstIssueAppearance?.MapToEntity();
     entity.GenderId    = model.GenderId;
     entity.Gender      = (Gender)model.Gender?.MapToEntity();
     entity.OriginId    = model.OriginId;
     entity.Origin      = (Origin)model.Origin?.MapToEntity();
     entity.PublisherId = model.PublisherId;
     entity.Publisher   = (Publisher)model.Publisher?.MapToEntity();
     // Associated Objects
     entity.CharacterAliases          = model.CharacterAliases?.Where(i => i.Active).Select(CharacterAliasMapperExtensions.MapToEntity).ToList();
     entity.CharacterCreators         = model.CharacterCreators?.Where(i => i.Active).Select(CharacterCreatorMapperExtensions.MapToEntity).ToList();
     entity.CharacterEnemies          = model.CharacterEnemies?.Where(i => i.Active).Select(CharacterEnemyMapperExtensions.MapToEntity).ToList();
     entity.CharacterEnemyTeams       = model.CharacterEnemyTeams?.Where(i => i.Active).Select(CharacterEnemyTeamMapperExtensions.MapToEntity).ToList();
     entity.CharacterFriends          = model.CharacterFriends?.Where(i => i.Active).Select(CharacterFriendMapperExtensions.MapToEntity).ToList();
     entity.CharacterFriendlyTeams    = model.CharacterFriendlyTeams?.Where(i => i.Active).Select(CharacterFriendlyTeamMapperExtensions.MapToEntity).ToList();
     entity.CharacterIssuesAppearedIn = model.CharacterIssuesAppearedIn?.Where(i => i.Active).Select(CharacterAppearedInIssueMapperExtensions.MapToEntity).ToList();
     entity.CharacterIssuesDiedIn     = model.CharacterIssuesDiedIn?.Where(i => i.Active).Select(CharacterDiedInIssueMapperExtensions.MapToEntity).ToList();
     entity.CharacterIssues           = model.CharacterIssues?.Where(i => i.Active).Select(CharacterIssueMapperExtensions.MapToEntity).ToList();
     entity.CharacterMovies           = model.CharacterMovies?.Where(i => i.Active).Select(CharacterMovieMapperExtensions.MapToEntity).ToList();
     entity.CharacterPowers           = model.CharacterPowers?.Where(i => i.Active).Select(CharacterPowerMapperExtensions.MapToEntity).ToList();
     entity.CharacterStoryArcs        = model.CharacterStoryArcs?.Where(i => i.Active).Select(CharacterStoryArcMapperExtensions.MapToEntity).ToList();
     entity.CharacterTeams            = model.CharacterTeams?.Where(i => i.Active).Select(CharacterTeamMapperExtensions.MapToEntity).ToList();
     entity.CharacterVolumes          = model.CharacterVolumes?.Where(i => i.Active).Select(CharacterVolumeMapperExtensions.MapToEntity).ToList();
 }
 public virtual void MapToEntity(IPersonModel model, ref IPerson entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Person Properties
     entity.Hometown  = model.Hometown;
     entity.Country   = model.Country;
     entity.Email     = model.Email;
     entity.Website   = model.Website;
     entity.BirthDate = model.BirthDate;
     entity.DeathDate = model.DeathDate;
     // Related Objects
     entity.PrimaryImageFileId = model.PrimaryImageFileId;
     entity.PrimaryImageFile   = (ImageFile)model.PrimaryImageFile?.MapToEntity();
     entity.GenderId           = model.GenderId;
     entity.Gender             = (Gender)model.Gender?.MapToEntity();
     // Associated Objects
     entity.CharactersCreated = model.CharactersCreated?.Where(i => i.Active).Select(CreatorCharacterMapperExtensions.MapToEntity).ToList();
     entity.PersonAliases     = model.PersonAliases?.Where(i => i.Active).Select(PersonAliasMapperExtensions.MapToEntity).ToList();
     entity.IssuesWritten     = model.IssuesWritten?.Where(i => i.Active).Select(IssueWriterMapperExtensions.MapToEntity).ToList();
     entity.MoviesProduced    = model.MoviesProduced?.Where(i => i.Active).Select(MovieProducerMapperExtensions.MapToEntity).ToList();
     entity.MoviesWritten     = model.MoviesWritten?.Where(i => i.Active).Select(MovieWriterMapperExtensions.MapToEntity).ToList();
     entity.PromosWritten     = model.PromosWritten?.Where(i => i.Active).Select(PromoMapperExtensions.MapToEntity).ToList();
     entity.StoryArcsWritten  = model.StoryArcsWritten?.Where(i => i.Active).Select(StoryArcWriterMapperExtensions.MapToEntity).ToList();
     entity.VolumesWritten    = model.VolumesWritten?.Where(i => i.Active).Select(VolumeWriterMapperExtensions.MapToEntity).ToList();
 }
示例#8
0
 public virtual void MapToEntity(IVolumeModel model, ref IVolume entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Volume Properties
     entity.Startyear = model.Startyear;
     // Related Objects
     entity.PrimaryImageFileId = model.PrimaryImageFileId;
     entity.PrimaryImageFile   = (ImageFile)model.PrimaryImageFile?.MapToEntity();
     entity.FirstIssueId       = model.FirstIssueId;
     entity.FirstIssue         = (Issue)model.FirstIssue?.MapToEntity();
     entity.LastIssueId        = model.LastIssueId;
     entity.LastIssue          = (Issue)model.LastIssue?.MapToEntity();
     entity.PublisherId        = model.PublisherId;
     entity.Publisher          = (Publisher)model.Publisher?.MapToEntity();
     // Associated Objects
     entity.Issues           = model.Issues?.Where(i => i.Active).Select(IssueMapperExtensions.MapToEntity).ToList();
     entity.VolumeAliases    = model.VolumeAliases?.Where(i => i.Active).Select(VolumeAliasMapperExtensions.MapToEntity).ToList();
     entity.VolumeCharacters = model.VolumeCharacters?.Where(i => i.Active).Select(VolumeCharacterMapperExtensions.MapToEntity).ToList();
     entity.VolumeConcepts   = model.VolumeConcepts?.Where(i => i.Active).Select(VolumeConceptMapperExtensions.MapToEntity).ToList();
     entity.VolumeLocations  = model.VolumeLocations?.Where(i => i.Active).Select(VolumeLocationMapperExtensions.MapToEntity).ToList();
     entity.VolumeObjects    = model.VolumeObjects?.Where(i => i.Active).Select(VolumeObjectMapperExtensions.MapToEntity).ToList();
     entity.VolumeTeams      = model.VolumeTeams?.Where(i => i.Active).Select(VolumeTeamMapperExtensions.MapToEntity).ToList();
     entity.VolumeWriters    = model.VolumeWriters?.Where(i => i.Active).Select(VolumeWriterMapperExtensions.MapToEntity).ToList();
 }
示例#9
0
        public virtual IVolume MapToEntity(IVolumeModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <Volume, IVolumeModel>(model);

            // Volume Properties
            entity.Startyear = model.Startyear;
            // Related Objects
            entity.PrimaryImageFileId = model.PrimaryImageFileId;
            entity.PrimaryImageFile   = (ImageFile)model.PrimaryImageFile?.MapToEntity();
            entity.FirstIssueId       = model.FirstIssueId;
            entity.FirstIssue         = (Issue)model.FirstIssue?.MapToEntity();
            entity.LastIssueId        = model.LastIssueId;
            entity.LastIssue          = (Issue)model.LastIssue?.MapToEntity();
            entity.PublisherId        = model.PublisherId;
            entity.Publisher          = (Publisher)model.Publisher?.MapToEntity();
            // Associated Objects
            entity.Issues           = model.Issues?.Where(i => i.Active).Select(IssueMapperExtensions.MapToEntity).Cast <Issue>().ToList();
            entity.VolumeAliases    = model.VolumeAliases?.Where(i => i.Active).Select(VolumeAliasMapperExtensions.MapToEntity).Cast <VolumeAlias>().ToList();
            entity.VolumeCharacters = model.VolumeCharacters?.Where(i => i.Active).Select(VolumeCharacterMapperExtensions.MapToEntity).Cast <VolumeCharacter>().ToList();
            entity.VolumeConcepts   = model.VolumeConcepts?.Where(i => i.Active).Select(VolumeConceptMapperExtensions.MapToEntity).Cast <VolumeConcept>().ToList();
            entity.VolumeLocations  = model.VolumeLocations?.Where(i => i.Active).Select(VolumeLocationMapperExtensions.MapToEntity).Cast <VolumeLocation>().ToList();
            entity.VolumeObjects    = model.VolumeObjects?.Where(i => i.Active).Select(VolumeObjectMapperExtensions.MapToEntity).Cast <VolumeObject>().ToList();
            entity.VolumeTeams      = model.VolumeTeams?.Where(i => i.Active).Select(VolumeTeamMapperExtensions.MapToEntity).Cast <VolumeTeam>().ToList();
            entity.VolumeWriters    = model.VolumeWriters?.Where(i => i.Active).Select(VolumeWriterMapperExtensions.MapToEntity).Cast <VolumeWriter>().ToList();
            // Return Entity
            return(entity);
        }
示例#10
0
 public virtual void MapToEntity(IStudioModel model, ref IStudio entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Studio Properties
     // <None>
     // Related Objects
     // <None>
     // Associated Objects
     entity.MovieStudios = model.MovieStudios?.Where(i => i.Active).Select(MovieStudioMapperExtensions.MapToEntity).ToList();
 }
 public virtual void MapToEntity(IOriginModel model, ref IOrigin entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Origin Properties
     entity.CharacterSet = model.CharacterSet;
     // Related Objects
     // <None>
     // Associated Objects
     entity.OriginProfiles = model.OriginProfiles?.Where(i => i.Active).Select(OriginProfileMapperExtensions.MapToEntity).ToList();
 }
 public virtual void MapToEntity(ITeamAliasModel model, ref ITeamAlias entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // TeamAlias Properties
     // <None>
     // Related Objects
     entity.TeamId = model.TeamId;
     entity.Team   = (Team)model.Team?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual void MapToEntity(IVolumeAliasModel model, ref IVolumeAlias entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // VolumeAlias Properties
     // <None>
     // Related Objects
     entity.VolumeId = model.VolumeId;
     entity.Volume   = (Volume)model.Volume?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual void MapToEntity(IStoryArcAliasModel model, ref IStoryArcAlias entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // StoryArcAlias Properties
     // <None>
     // Related Objects
     entity.StoryArcId = model.StoryArcId;
     entity.StoryArc   = (StoryArc)model.StoryArc?.MapToEntity();
     // Associated Objects
     // <None>
 }
 public virtual void MapToEntity(IPowerAliasModel model, ref IPowerAlias entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // PowerAlias Properties
     // <None>
     // Related Objects
     entity.PowerId = model.PowerId;
     entity.Power   = (Power)model.Power?.MapToEntity();
     // Associated Objects
     // <None>
 }
示例#16
0
 public virtual void MapToEntity(ILocationAliasModel model, ref ILocationAlias entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // LocationAlias Properties
     // <None>
     // Related Objects
     entity.LocationId = model.LocationId;
     entity.Location   = (Location)model.Location?.MapToEntity();
     // Associated Objects
     // <None>
 }
示例#17
0
 public virtual void MapToEntity(IPowerModel model, ref IPower entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Power Properties
     // <None>
     // Related Objects
     // <None>
     // Associated Objects
     entity.CharacterPowers = model.CharacterPowers?.Where(i => i.Active).Select(CharacterPowerMapperExtensions.MapToEntity).ToList();
     entity.PowerAliases    = model.PowerAliases?.Where(i => i.Active).Select(PowerAliasMapperExtensions.MapToEntity).ToList();
 }
 public virtual void MapToEntity(IObjectAliasModel model, ref IObjectAlias entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // ObjectAlias Properties
     // <None>
     // Related Objects
     entity.ObjectId = model.ObjectId;
     entity.Object   = (Object)model.Object?.MapToEntity();
     // Associated Objects
     // <None>
 }
示例#19
0
 public virtual void MapToEntity(IResourceTypeModel model, ref IResourceType entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // ResourceType Properties
     entity.DetailResourceName = model.DetailResourceName;
     entity.ListResourceName   = model.ListResourceName;
     // Related Objects
     // <None>
     // Associated Objects
     entity.Promos = model.Promos?.Where(i => i.Active).Select(PromoMapperExtensions.MapToEntity).ToList();
 }
 public virtual void MapToEntity(IChatModel model, ref IChat entity, int currentDepth = 1)
 {
     currentDepth++;
     // Assign Base properties
     NameableEntityMapper.MapToEntity(model, ref entity);
     // Chat Properties
     entity.ChannelName  = model.ChannelName;
     entity.PasswordHash = model.PasswordHash;
     // Related Objects
     entity.ImageFileId = model.ImageFileId;
     entity.ImageFile   = (ImageFile)model.ImageFile?.MapToEntity();
     // Associated Objects
     // <None>
 }
示例#21
0
        public virtual IStudio MapToEntity(IStudioModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <Studio, IStudioModel>(model);

            // Studio Properties
            // <None>
            // Related Objects
            // <None>
            // Associated Objects
            entity.MovieStudios = model.MovieStudios?.Where(i => i.Active).Select(MovieStudioMapperExtensions.MapToEntity).Cast <MovieStudio>().ToList();
            // Return Entity
            return(entity);
        }
        public virtual IOrigin MapToEntity(IOriginModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <Origin, IOriginModel>(model);

            // Origin Properties
            entity.CharacterSet = model.CharacterSet;
            // Related Objects
            // <None>
            // Associated Objects
            entity.OriginProfiles = model.OriginProfiles?.Where(i => i.Active).Select(OriginProfileMapperExtensions.MapToEntity).Cast <OriginProfile>().ToList();
            // Return Entity
            return(entity);
        }
        public virtual IPowerAlias MapToEntity(IPowerAliasModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <PowerAlias, IPowerAliasModel>(model);

            // PowerAlias Properties
            // <None>
            // Related Objects
            entity.PowerId = model.PowerId;
            entity.Power   = (Power)model.Power?.MapToEntity();
            // Associated Objects
            // <None>
            // Return Entity
            return(entity);
        }
        public virtual IStoryArcAlias MapToEntity(IStoryArcAliasModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <StoryArcAlias, IStoryArcAliasModel>(model);

            // StoryArcAlias Properties
            // <None>
            // Related Objects
            entity.StoryArcId = model.StoryArcId;
            entity.StoryArc   = (StoryArc)model.StoryArc?.MapToEntity();
            // Associated Objects
            // <None>
            // Return Entity
            return(entity);
        }
示例#25
0
        public virtual IPower MapToEntity(IPowerModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <Power, IPowerModel>(model);

            // Power Properties
            // <None>
            // Related Objects
            // <None>
            // Associated Objects
            entity.CharacterPowers = model.CharacterPowers?.Where(i => i.Active).Select(CharacterPowerMapperExtensions.MapToEntity).Cast <CharacterPower>().ToList();
            entity.PowerAliases    = model.PowerAliases?.Where(i => i.Active).Select(PowerAliasMapperExtensions.MapToEntity).Cast <PowerAlias>().ToList();
            // Return Entity
            return(entity);
        }
        public virtual IObjectAlias MapToEntity(IObjectAliasModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <ObjectAlias, IObjectAliasModel>(model);

            // ObjectAlias Properties
            // <None>
            // Related Objects
            entity.ObjectId = model.ObjectId;
            entity.Object   = (Object)model.Object?.MapToEntity();
            // Associated Objects
            // <None>
            // Return Entity
            return(entity);
        }
        public virtual IVolumeAlias MapToEntity(IVolumeAliasModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <VolumeAlias, IVolumeAliasModel>(model);

            // VolumeAlias Properties
            // <None>
            // Related Objects
            entity.VolumeId = model.VolumeId;
            entity.Volume   = (Volume)model.Volume?.MapToEntity();
            // Associated Objects
            // <None>
            // Return Entity
            return(entity);
        }
示例#28
0
        public virtual ILocationAlias MapToEntity(ILocationAliasModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <LocationAlias, ILocationAliasModel>(model);

            // LocationAlias Properties
            // <None>
            // Related Objects
            entity.LocationId = model.LocationId;
            entity.Location   = (Location)model.Location?.MapToEntity();
            // Associated Objects
            // <None>
            // Return Entity
            return(entity);
        }
        public virtual ITeamAlias MapToEntity(ITeamAliasModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <TeamAlias, ITeamAliasModel>(model);

            // TeamAlias Properties
            // <None>
            // Related Objects
            entity.TeamId = model.TeamId;
            entity.Team   = (Team)model.Team?.MapToEntity();
            // Associated Objects
            // <None>
            // Return Entity
            return(entity);
        }
示例#30
0
        public virtual IResourceType MapToEntity(IResourceTypeModel model, int currentDepth = 1)
        {
            currentDepth++;
            var entity = NameableEntityMapper.MapToEntity <ResourceType, IResourceTypeModel>(model);

            // ResourceType Properties
            entity.DetailResourceName = model.DetailResourceName;
            entity.ListResourceName   = model.ListResourceName;
            // Related Objects
            // <None>
            // Associated Objects
            entity.Promos = model.Promos?.Where(i => i.Active).Select(PromoMapperExtensions.MapToEntity).Cast <Promo>().ToList();
            // Return Entity
            return(entity);
        }