任务是新建一个搜索界面,Model、View、Control已写好,但在运行时总会提示【发现不明确匹配】请问大概是哪儿的问题
[ActionDescription("Search")] public ActionResult Index() { var vm = CreateVM<SETSalesReturnHistoryListVM>(); return PartialView(vm); }
protected override void InitListVM() { List<IGridColumn<SETSalesReturnHistory_ListView>> rv = new List<IGridColumn<SETSalesReturnHistory_ListView>>(); rv.Add(this.MakeGridColumn(x => x.ID)); rv.Add(this.MakeGridColumn(x => x.LuckyID)); rv.Add(this.MakeGridColumn(x => x.MachineID)); . , , , , , rv.Add(this.MakeGridColumn(x => x.StockSubAreaName)); ListColumns = rv; }
public class SETSalesRetSurnHistory_ListView : BasePoco { [Display(Name = "ID")] public int ID { get; set; } . . . . . [Display(Name = "StockSubAreaID")] public string StockSubAreaID { get; set; } [Display(Name = "StockSubAreaName")] public string StockSubAreaName { get; set; } }
是Model在建立的时候与它所继承的Model有重名的变量,所以有不明确的匹配