查询,有很多种、有单表查询、有多表查询、有精准查询、有模糊查询,那么现在看看较简单的模糊查询
对于模糊查询的了解就是,输入一个或几个数字或文字,然后点击查询按钮查询,或获取Enter键按下事件查询出数据
先在控制器连表把数据查询出来
from tbVehicle in myModels.R_Vehicle//车辆表
join tbVehicleOwner in myModels.B_VehicleOwner on tbVehicle.VehicleOwnerID equals tbVehicleOwner.VehicleOwnerID//车主表
join tbVehicleInfor in myModels.B_VehicleInfor on tbVehicle.VehicleInforID equals tbVehicleInfor.VehicleInforID//车辆证件表
select new Driverlist
写出一些要显示的字段
VehicleID = tbVehicle.VehicleID,//车辆ID
VehicleNumber=tbVehicle.VehicleNumber,//车辆编号
PlatePlate = tbVehicle.PlatePlate,//车牌号
EngineModel=tbVehicle.EngineModel,//发动机型号
VehicleFication=tbVehicle.VehicleFication,//车辆识别号
VehicleModification=tbVehicle.VehicleModification,//车辆改型情况
VehicleInforID=tbVehicleInfor.VehicleInforID,//车辆证件表ID
VehicleOwnerID=tbVehicleOwner.VehicleOwnerID,//车主ID
OwnerName=tbVehicleOwner.OwnerName,//车主姓名
OwnerAdd