Looks to me like the problem is with the editor not the drop down. the drop down is setting Profits.Id, the editor should be setting the Profits.CategoryName.Id to whatever the user entered on the text, maybe it fails because you are not sending a model to the view.
Try sending an empty Profits to the model:
public ActionResult Create()
{
var dba = new WHFMDBContext();
var query = dba.Categories.Select(c => new { c.Id, c.Name });
ViewBag.Id = new SelectList(query.AsEnumerable(), "Id", "Name", 3);
Profits model = new Profits();
model.CategoryName = new CategoryName();
return View(model);
}
Also should'nt you have the dropdown for the category name id?
@Html.DropDownListFor(model => model.CategoryName.Id,(SelectList) ViewBag.Id, "--Select One--" )