using DatabaseEditor.BL.Models;
using DatabaseEditor.Messages;

namespace DatabaseEditor.ViewModels
{
    public class EditAuthorViewModel : EditItemViewModel<AuthorDetialModel, BookListModel>
    {
        protected override void AddItem(AddItemMessage<BookListModel> message)
        {
            var item = message.Item;
            if (item == null) return;

            ItemDetail.Books.Add(item);
        }

        protected override void RemoveItem(BookListModel item)
        {
            ItemDetail.Books.Remove(item);
        }
    }
}
