public async Task <ActionResult> Create([Bind(Include = "ProductId,ItemId")] ProductItem productItem) { if (ModelState.IsValid) { var canCreate = await productItem.CanCreate(db); if (canCreate) { db.ProductItems.Add(productItem); await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ModelState.AddModelError("", "Info already created!"); } var model = await productItem.Convert(db); return(View(model)); }