ListBox for a many-to-many relationship
Rather than using ViewData I might consider using ViewBag (if on MVC 3 and above) or even wrapping Author within a ViewModel.  That what you won't need the cast on the view (if using a viewModel).

Otherwise your MultiSelectList code is only one line.  Don't see you getting much better than that :)

Your viewmodel might look like

public class AuthorViewModel 
{
   public Author BookAuthor { get; set; }
   public MultiSelectList BookList { get; set; }
}

[HttpGet]
public ActionResult Edit(int id = 0)
{
    Author author = db.Authors.Find(id);
    if (author == null)
    {
        return HttpNotFound();
    }

    var viewModel = new AuthorViewModel 
    {
       BookAuthor = author;
       BookList = new MultiSelectList(db.Books, "Id", "Name", author.Books.Select(x =&gt; x.Id).ToArray());
    }

    return View(viewModel);
}


Your view will need to be typed to the view model and you could then write

Html.ListBox("SelectedBooks",Model.BookList);


I'm not 100% sure then if you need to re-bind it back on the post if there is a problem.  If you do, I would consider doing that after the Model.IsValid unless of course your "Index" action usings the ViewData["BookList"] value?

EDIT:
Ok, what about this then.

    internal class BookEqualityComparer : IEqualityComparer&lt;Book&gt;
    {
        public bool Equals(Book x, Book y)
        {
            return x.Id == y.Id;
        }

        public int GetHashCode(Book obj)
        {
            return obj.GetHashCode();
        }
    }


Then your code in the Post will be:

    // Take the values common to both lists based on the EqualityComparer
    edit.Books.Union(author.SelectedBooks, new BookEqualityComparer ());


And I would consider making the Books DbSet lazy loaded.

public class DataContext : DbContext
{
    private DbSet&lt;Book&gt; _books;
    public DbSet&lt;Book&gt; Books 
    { 
       get { return _books ?? (_book = new DbSet&lt;Book&gt;()); } // TBH not 100% sure you can set DbSet like this but worth a shot 
       set { _books = value; } 
    }

    public DbSet&lt;Author&gt; Authors { get; set; }
}