예제 #1
0
        public PublicationModel Get(int id)
        {
            var entity = _publicationRepository.Get(id);

            entity.File = _publicationFileRepository.Get(entity.FileId);
            return(PublicationFactory.Create(entity));
        }
예제 #2
0
        public void Add(PublicationModel model)
        {
            var entity = PublicationFactory.Create(model);

            _publicationRepository.Add(entity);

            model.Id = entity.Id;
        }