Пример #1
0
        public static AlternativeTitle ToModel(this AlternativeTitleResource resource)
        {
            if (resource == null)
            {
                return(null);
            }

            return(new AlternativeTitle
            {
                Id = resource.Id,
                SourceType = resource.SourceType,
                MovieId = resource.MovieId,
                Title = resource.Title,
                SourceId = resource.SourceId,
                Votes = resource.Votes,
                VoteCount = resource.VoteCount,
                Language = resource.Language
            });
        }
Пример #2
0
        public static AlternativeTitleResource ToResource(this AlternativeTitle model)
        {
            if (model == null)
            {
                return(null);
            }

            AlternativeTitleResource resource = null;

            return(new AlternativeTitleResource
            {
                Id = model.Id,
                SourceType = model.SourceType,
                MovieId = model.MovieId,
                Title = model.Title,
                SourceId = model.SourceId,
                Votes = model.Votes,
                VoteCount = model.VoteCount,
                Language = model.Language
            });
        }