public PublicationModel Get(int id) { var entity = _publicationRepository.Get(id); entity.File = _publicationFileRepository.Get(entity.FileId); return(PublicationFactory.Create(entity)); }
public void Add(PublicationModel model) { var entity = PublicationFactory.Create(model); _publicationRepository.Add(entity); model.Id = entity.Id; }