Используя AutoMapper, как я могу скопировать AuthorBooks
объект в Author
?
Ниже приведены их свойства:
public class AuthorBooks
{
public int AuthorId { get; set; }
public string LastName { get; set; }
public int BookId { get; set; }
public string Title { get; set; }
}
public class Author
{
public int AuthorId { get; set; }
public string LastName { get; set; }
public List<Book> Titles { get; set; }
}
public class Book
{
public int BookId { get; set; }
public string Title { get; set; }
}