public ICollection <AuthorLiterature> Resolve(LiteratureDto source, Literature destination, ICollection <AuthorLiterature> destMember, ResolutionContext context) { return(source.Annotations?.Select(authorDto => new AuthorLiterature { Author = context.Mapper.Map <Author>(authorDto), Literature = destination }) .ToList()); }
public ObjectResult AddLiterature([FromBody] LiteratureDto literatureDto) { return(Ok(literatureDto)); }