So to make sure I understand correctly.
You have 2 models. Inventory and Orders. These models correspond to tables of Inventory and Orders as well?
Since i don't see any code for your Action in your controller i'm going make one up.
I'll first provide one of many possible solutions, then provide a suggestion.
[HttpPost]
public ActionResult Order(Inventory model)
{
var qty = Request.Form["qty"];
var order = new Order();
order.name = model.name;
order.mrp = model.mrp;
order.qty = qty;
Mapper.Register<order,>();
var orderOpt2 = Mapper.Map<inventory,>(model);
orderOpt2.qty = qty;
}
Now i would suggest using a model specific to this view that encompasses all fields/properties necessary to this view. You stated in your question that Inventory doesn't have a property of qty, your view is strongly typed to the Inventory Entity, yet you are trying to use a strongly typed edit for a property on this Entity that doesn't exist.
What i'm saying do something like
public class InventoryModel
{
public int Id {get;set;}
public string name {get;set;}
public string mrp {get;set;}
public int qty {get;set;}
}
public class ProductController : Controller
{
public ActionResult Inventory(int invid)
{
var inventoryFromDb =
var model = new InventoryModel();
model.Id = inventoryFromDb.id;
model.name = inventoryFromDb.name;
model.mrp = inventoryFromDb.mrp;
return View(model);
}
}
Then in your view you would use InventoryModel instead of SaveTextboxes.Models.inventory