inventory.SiteId=Siteitem.Siteid; inventory.CreatedBy=currentuser; inventory.CreatedDate=DateTime.Today; TryUpdateModel(inventory);
要么
UpdateModel(inventory);
两者都无法更新模型