public Resp_Binary Modify(CarType model) { if (model.IsNull()) { return new Resp_Binary { message = "请选择要操作的记录" } } ; var record = _carTypeRepository.GetById(model.ID); if (record.IsNull()) { return new Resp_Binary { message = "未找到记录信息,请刷新页面" } } ; record.Name = model.Name; _carTypeRepository.Update(record); if (_carTypeRepository.UnitOfWork.Commite() > 0) { return(Resp_Binary.Modify_Sucess); } return(Resp_Binary.Modify_Failed); }